-3

Color cannot be changed with ngClass using bootstrap class "text-white".

Code:

[ngClass] = "{'text-white': log >= 5}"
  • 1
    Does this answer your question? [Angular: conditional class with \*ngClass](https://stackoverflow.com/questions/35269179/angular-conditional-class-with-ngclass) – yazan Nov 11 '20 at 08:12

1 Answers1

1

Demo Your syntax is correct if log is a number. Firstly check if it is number then be sure that class has style attribute in css in application

in your component css add this to check

.text-white{
  color:white;
}
mr. pc_coder
  • 16,412
  • 3
  • 32
  • 54