Angular 8 Interview Questions and Answers
Question: Explain the use of *ngFor and *ngIf directives.Answer: *ngFor is a structural directive in Angular used for iterating over a list of items and creating a template for each item. *ngIf is a structural directive that conditionally includes or excludes elements based on an expression.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: