Property Binding

Square brackets bind an element's property to the component's data, such as [src]="imageUrl" or [disabled]="soldOut". [class.name] turns a CSS class on and off, and [style.prop] sets one style, all kept up to date by Angular.

Updated

Cheat sheet: Property Binding
Category
Angular
Level
Apprentice
Tags
angular, Class and Style Binding, Property Binding