There are mainly two types of directives as below –
Structural Directives are used for manipulating the DOM elements. You will find an asterisk (*) prefix before the directive. We can take*ngFor and *ngIf as examples here.
When it comes to altering the behavior and look of the DOM element, you turn to attribute directives.