Answer the question
In order to leave comments, you need to log in
How to pass value to ngClass?
There is such a template. <div [ngClass]="_bodyClass"></div>
On the first load, all classes are applied, but when the _bodyClass is further changed on the template, nothing happens, although if you do this, <div [ngClass]="{'testClass':myVariable}"></div>
everything works. What is the problem?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question