HostBinding
decorator
Decorator that marks a DOM property or an element class, style or attribute as a host-binding property and supplies configuration metadata. Angular automatically checks host bindings during change detection, and if a binding changes it updates the host element of the directive.
API
Usage Notes
@HostBinding ({})
hostPropertyName
string | undefined
The DOM property that is bound to a data property. This field also accepts:
- classes, prefixed by
class.
- styles, prefixed by
style.
- attributes, prefixed by
attr.
Jump to details