angular/packages/compiler-cli/linker/babel/src
Miles Malerba 0361c2d81f feat(compiler): support void operator in templates (#59894)
Add support for the `void` operator in templates and host bindings.

This is useful when binding a listener that may return `false` and
unintentionally prevent the default event behavior.

Ex:
```
@Directive({
  host: { '(mousedown)': 'void handleMousedown()' }
})
```

BREAKING CHANGE: `void` in an expression now refers to the operator

Previously an expression in the template like `{{void}}` referred to a
property on the component class. After this change it now refers to the
`void` operator, which would make the above example invalid. If you have
existing expressions that need to refer to a property named `void`,
change the expression to use `this.void` instead: `{{this.void}}`.

PR Close #59894
2025-02-25 11:03:37 -05:00
..
ast feat(compiler): support void operator in templates (#59894) 2025-02-25 11:03:37 -05:00
babel_declaration_scope.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
babel_plugin.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
es2015_linker_plugin.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
linker_plugin_options.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00