Angular 7 References/ Templates

[attr.] binding

This is the documentation for Angular 7.
You can switch to the latest version Angular 10.

You can set the value of an attribute directly with an attribute binding.

Interpolation and property binding can set only properties, not attributes. You can check out list of registered properties in the element schema registry.

You need attribute bindings to create and bind to custom attributes:

<button [attr.aria-label]="actionName">{{actionName}} with Aria</button>