Built-in Directive in Angular 2
There are three kinds of directives in Angular:
- Components is a directives with a template, class and metadata.
- Structural directives is a directive which change the DOM layout by adding and removing DOM elements. For Example ngIf, ngFor, ngSwitch are called Structural Directive
- Attribute directives change the appearance or behavior of an element. ngClass amd ngStyle are the example of Attribute directives.