The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Apply CSS Classes Conditionally with Angular 2’s ngClass

Apply CSS Classes Conditionally with Angular 2’s ngClass

2:10
`ngClass` is Angular 2's way of allowing you to apply classes and styles based on what's happening in your component. While CSS covers many scenarios with pseudo classes, you'll often run into scenarios where you need to apply classes based on certain conditions, so `ngClass` comes to the rescue.
Watch this lesson now
Avatar
egghead.io

ngClass is Angular 2's way of allowing you to apply classes and styles based on what's happening in your component. While CSS covers many scenarios with pseudo classes, you'll often run into scenarios where you need to apply classes based on certain conditions, so ngClass comes to the rescue.

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?