How to Add & Remove CSS Classes dynamically in Angular?
How to Add & Remove CSS Classes dynamically in Angular?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Bhairab DuttPosted May 26, 2018, 1:02 PM
You can use Class Binding as:
app.component.html
"color:blue"
>Class BindingYou can use [ngClass] Directive .
If you want to read about more binding in Angular 4 , You can read my Article :
https://www.c-sharpcorner.com/article/learn-binding-in-angular/
Hope Its help you.
Thanks.
Bhairab DuttPosted May 26, 2018, 2:51 PM
Sanjit Kumar SinghPosted May 26, 2018, 2:17 PM