Spread operators
1) Bindables spreading
Syntax options
<!-- Recommended: put the expression in the attribute value -->
<user-card ...$bindables="user"></user-card>
<!-- Equivalent: explicit binding command form -->
<user-card $bindables.spread="user"></user-card>
<!-- Shorthand: put the expression in the attribute name (no spaces!) -->
<user-card ...user></user-card>Example
Important gotchas
Avoid double-binding the same property
2) Attribute transferring (...$attrs)
...$attrs)Minimal example
What gets captured?
Restrictions
Last updated
Was this helpful?