Question: how does ng class work?
Answer: The ng-class directive dynamically binds one or more CSS classes to an HTML element. The value of the ng-class directive can be a string, an object, or an array. If it is a string, it should contain one or more, space-separated class names. ... The class will only be added if the value is set to true.