Built-in Directive in Angular 2

There are three kinds of directives in Angular:

  1. Components is a directives with a template, class and metadata.
  2. 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
  3. Attribute directives change the appearance or behavior of an element. ngClass amd ngStyle are the example of Attribute directives.

Directive

results matching ""

    No results matching ""