AngularJS ngClass conditional
Your first attempt was almost right, It should work without the quotes. Here is a plnkr. The ngClass directive will work with any expression that evaluates truthy or falsey, a bit similar to Javascript expressions but with some differences, you can read about here. If your conditional is too complex, then you can use a function that … Read more