Question: Explain the role of the Angular ngClass directive.Answer: The ngClass directive in Angular is used to conditionally apply CSS classes to an element. It allows you to dynamically set classes based on expressions or conditions in the component.Example:
|
Is it helpful?
Yes
No
Most helpful rated by users: