Is there a way to add a class from the .ts file, using Angular solutions
I want to d
You can use ngClass directive:
ngClass
Simple as that! myDiv will have the class myCSSclass only when the condition evaluates to true. This condition can be set in your typescript file or in the template.
myCSSclass
condition
true