ngClass directive in Angular || with easy step-by-step

preview_player
Показать описание
ngClass is a directive in Angular that adds and removes CSS classes on an HTML element.
Explained detailed way below examples, please subscribe @Channel11tv

[ngClass]="'first second'"
[ngClass]="['first', 'second']"
[ngClass]="{'first': true, 'second': true, 'third': false}"
[ngClass]="stringExp|arrayExp|objExp"
[ngClass]="{'class1 class2 class3' : true}"

#channel11angular #ngclass #ngclassdirective
Рекомендации по теме