While adding a single class works great in this way -
[class.loading-state]=\"loading\"
But how do I add multiple classes Ex if loading>
loading>
You can do this by simply using ngClass :
ngClass
Here first,second and third are the name of the classes.
And instead of true/false , you can directly put your conditions over there
...
In your case
Or Shorter Veriosn (as @matko.kvesic commented)