In this video we are going to learn how about CSS class binding in #angular and How many different ways to add or remove class from html element.

We can do in three different way

  1. we can add in normal way using class attribute of element
  2. we can use angular property binding [class]=“variableName” to add class in angular
  3. we can add or remove class dynamically in angular using [class.cssClassName]=“booleanVariable”, if variable value is true then css class will be applied to element otherwise not,
  4. we can also add or remove group of class in angular using [ngClass]=“objectname” object key will be css class name and the value of key will be boolean value either true or false,
    If true then that css class will be applied to the element

Watch this video till the very end and get to know more about class binding


Angular 8 2020 | Introduction to Angular
https://youtu.be/kydPq4r2vbE
Angular 8 2020 | Angular Project Setup #2
https://youtu.be/zsb4vYFf1eI
Angular 8 2020 | Workspace vs File Structure of Angular #3
https://youtu.be/1ukJR6te398
Angular 8 2020 | Single Page Application vs Multi page Application #4
https://youtu.be/jA7Xvw1JNw4
Angular 8 2020 | Complete architecture Overview #5
https://youtu.be/lRTaT74OUic
Angular 8 2020 | What is Component in Angular Application #6
https://youtu.be/5BFeKxGyFdg
Angular 8 2020 | Interpolation #7
https://youtu.be/egNDI8nN8Og
Angular 8 2020 | Property binding #8
https://youtu.be/f9BNLAENCIs

#angular #angular 8

Angular 8 - tutorial | Class Binding #9
1.25 GEEK