Angular 2Directives

Download Angular 2 for free

Syntax

  • <input [value]="value"> - Binds attribute value class member name.

  • <div [attr.data-note]="note"> - Binds attribute data-note to variable note.

  • <p green></p> - Custom directive

Remarks

The main source of information about Angular 2 directives is the official documentation https://angular.io/docs/ts/latest/guide/attribute-directives.html

Related Examples

*ngFor