Custom attributes
Creating Custom Attributes
Convention-based Custom Attributes
export class UppercaseCustomAttribute {
static inject = [Element];
constructor(element) {
this.element = element;
}
valueChanged(newValue) {
this.element.textContent = newValue.toUpperCase();
}
}<span uppercase.bind="name"></span>Single Value Binding
Accessing the Element
Multi-value Bindable Properties
Responding to Bindable Property Changes
Options Binding
Specifying a Primary Property
Lifecycle Hooks
Caveats and Considerations
Naming Conflicts
Unexpected Behavior with One-time Bindings
Attribute vs. Element Semantics
Case Sensitivity in Templates
Unbinding and Memory Leaks
Last updated
Was this helpful?