forked from angular/code.angularjs.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathangular.directive.html
38 lines (35 loc) · 3.27 KB
/
angular.directive.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<h1>angular.directive</h1>
<div class="angular-directive"><p>Angular directives create custom attributes for DOM elements. A directive can modify the
behavior of the element in which it is specified. Do not use directives to add elements to the
DOM; instead, use <a href="#!/api/angular.widget"><code>widgets</code></a> to add DOM elements.</p>
<p>Following is the list of built-in Angular directives:</p>
<ul>
<li><a href="#!/api/angular.directive.ng:autobind"><code>ng:autobind</code></a> - An Angular bootstrap parameter that can
act as a directive.</li>
<li><a href="#!/api/angular.directive.ng:bind"><code>ng:bind</code></a> - Creates a data-binding between an HTML text value
and a data model.</li>
<li><a href="#!/api/angular.directive.ng:bind-attr"><code>ng:bind-attr</code></a> - Creates a data-binding in a way similar
to <code>ng:bind</code>, but uses JSON key / value pairs to do so.</li>
<li><a href="#!/api/angular.directive.ng:bind-template"><code>ng:bind-template</code></a> - Replaces the text value of an
element with a specified template.</li>
<li><a href="#!/api/angular.directive.ng:change"><code>ng:change</code></a> - Executes an expression when the value of an
input widget changes.</li>
<li><a href="#!/api/angular.directive.ng:class"><code>ng:class</code></a> - Conditionally set a CSS class on an element.</li>
<li><a href="#!/api/angular.directive.ng:class-even"><code>ng:class-even</code></a> - Like <code>ng:class</code>, but works in
conjunction with <a href="#!/api/angular.widget.@ng:repeat"><code>angular.widget.@ng:repeat</code></a> to affect even rows in a collection.</li>
<li><a href="#!/api/angular.directive.ng:class-odd"><code>ng:class-odd</code></a> - Like <code>ng:class</code>, but works with <a href="#!/api/angular.widget.@ng:repeat"><code>angular.widget.@ng:repeat</code></a> to affect odd rows.</li>
<li><a href="#!/api/angular.directive.ng:click"><code>ng:click</code></a> - Executes custom behavior when an element is
clicked.</li>
<li><a href="#!/api/angular.directive.ng:controller"><code>ng:controller</code></a> - Creates a scope object linked to the
DOM element and assigns behavior to the scope.</li>
<li><a href="#!/api/angular.directive.ng:hide"><code>ng:hide</code></a> - Conditionally hides a portion of HTML.</li>
<li><a href="#!/api/angular.directive.ng:href"><code>ng:href</code></a> - Places an href in the Angular namespace.</li>
<li><a href="#!/api/angular.directive.ng:init"><code>angular.directive.ng:init</code></a> - Initialization tasks run before a template is executed.</li>
<li><a href="#!/api/angular.directive.ng:show"><code>ng:show</code></a> - Conditionally displays a portion of HTML.</li>
<li><a href="#!/api/angular.directive.ng:src"><code>ng:src</code></a> - Places a <code>src</code> attribute into the Angular namespace.</li>
<li><a href="#!/api/angular.directive.ng:style"><code>ng:style</code></a> - Conditionally set CSS styles on an element.</li>
<li><a href="#!/api/angular.directive.ng:submit"><code>angular.directive.ng:submit</code></a> - Binds Angular expressions to <code>onSubmit</code> events.</li>
</ul>
<p>For more information about how Angular directives work, and to learn how to create your own
directives, see <a href="#!/guide/dev_guide.compiler.directives">Understanding Angular Directives</a> in
the Angular Developer Guide.</p></div>