mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
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
|
||
|---|---|---|
| .. | ||
| ast | ||
| babel_declaration_scope.ts | ||
| babel_plugin.ts | ||
| es2015_linker_plugin.ts | ||
| linker_plugin_options.ts | ||