Difference between revisions of "AngularJS directive"
From Wiki @ Karl Jones dot com
Karl Jones (Talk | contribs) |
Karl Jones (Talk | contribs) |
||
Line 5: | Line 5: | ||
* [[AngularJS component|Components]] — directives with a template. | * [[AngularJS component|Components]] — directives with a template. | ||
* [[AngularJS structural directive|Structural directives]] — change the DOM layout by adding and removing DOM elements. | * [[AngularJS structural directive|Structural directives]] — change the DOM layout by adding and removing DOM elements. | ||
− | * [[AngularJS | + | * [[AngularJS architectural directive|Attribute directives]] — change the appearance or behavior of an element. |
Built-in directives include structural directives and attribute directives. | Built-in directives include structural directives and attribute directives. |
Revision as of 10:36, 2 January 2017
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.
Writing custom directives, and using the built-in directives, is th