AngularJS directive

From Wiki @ Karl Jones dot com
Revision as of 11:26, 2 January 2017 by Karl Jones (Talk | contribs)

Jump to: navigation, search

In AngularJS, a directive is a class decorated with @Directive.

There are three kinds of directives in Angular:

  • Components — directives with a template.
  • Structural directives — change the DOM layout by adding and removing DOM elements.
  • Attribute directives — change the appearance or behavior of an element.


Built-in directives include structural directives and attribute directives.

A directive combined with a template is a component.

See also

External links

  • Angular Directivs