Angular NgClass Example – How to Add Conditional CSS Classes

1 · freeCodeCamp.org · June 7, 2021, 3:03 p.m.
ngClass is a directive in Angular that adds and removes CSS classes on an HTML element. In this article, we are talking about ngClass in Angular only, not ng-class in angular.js. Prerequisites – What is Property Binding?Two things we have to understand first are property binding and interpolation in...

Placeholder image
freeCodeCamp.org

Learn to code for free with millions of other people around the world