Angular 8 Interview Questions and Answers
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:
|
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Is it helpful? Yes No
Most helpful rated by users: