6 min read
•Question 5 of 46mediumDirectives in Angular
Structural and attribute directives.
Types of Directives
1. Component Directives
Components are directives with templates.
2. Structural Directives
Change DOM layout by adding/removing elements (*ngIf, *ngFor, *ngSwitch).
3. Attribute Directives
Change appearance or behavior (ngClass, ngStyle, custom).