Skip to content

Glossary: Angular Basics

Class binding

Also written: [class.x]

A binding like `[class.new]="..."` that adds a CSS class while the expression is true and removes it when false.

Where the book teaches it