Closed LastLeaf closed 8 months ago
The legacy bindxxx
syntax without :
is only valid in these conditions.
For component tags, it is valid, but can be overrided by component properties. For example:
<my-component bindtap="func" />
This will be treated as bind:tap
, unless bindtap
is a component property of my-component
.
For native node tags, it is valid only when fallbackListenerOnNativeNode
is set in the user's template configuration. This configuration can be set like this:
Component({ template: { fallbackListenerOnNativeNode: true, /* compiled template body */ } })
It is NOT recommanded since it disables any attribute names started with bind
catch
on
.
Invalid on other tags.
It is recommanded that :
should ALWAYS be added for event bindings. It makes code clear and results in better compilation results.
This should be made clear in documentation.