Skip to main content

Posts

Showing posts with the label Use of ngClass in angular.

How to use ngClass in angular?

ngClass Using String Syntax This is the simplest way to use ngClass. You can just add an Angular variable to ng-class  and that is the class that will be used for that elements for example - <div ng-class="textType">Look at me </d iv> Then in component CSS write CSS for textType class Like as .textType{ color:red; }