What is the difference between Structural and Attribute directives ?
Directives are divided into two types namely Structural and Attribute directives.
These are the differences:
- It changes the structure of the DOM.
- * is prefixed to the structural directives.
- *ngIf, *ngFor are the examples of structural directives.
- It just changes the appearance of the DOM.
- It is not prefixed with *.
- ngClass, ngStyle are the examples of attribute directives.
2,326 total views, 2 views today