Directive reference

Look up the purpose, syntax, parameters, and examples for each directive shipped by AngularTS.

A directive is an HTML attribute or element that adds framework behavior. If you do not yet know which directive you need, begin with the directive guides. This section is an alphabetical lookup reference.


ng-repeat

Complete reference for ng-repeat: iterating arrays and objects, special scope variables, filters, animation, and performance guidance.

ARIA directives

Form directives

API reference for form, ng-form, validation, and ng-messages directives.

ng-app

Bootstrap AngularTS application

ng-bind

Sync or hydrate textContent of element with an expression

ng-bind-html

Bind an HTML string to an element after the application has sanitized it.

ng-bind-template

Bind interpolated template text to an element.

ng-blur

Handler for blur event

ng-channel

Subscribe a template to a messaging service topic

ng-class

Dynamically bind one or more CSS classes using expressions.

ng-click

Handler for click event

ng-cloak

Hide interpolated templates

ng-copy

Handler for copy event

ng-cut

Handler for cut event

ng-dblclick

Handler for dblclick event

ng-el

Reference to an element

ng-focus

Handler for focus event

ng-get

Initiates a GET request

ng-hide

Hide an element when an expression is truthy.

ng-if

Conditionally add or remove an element from the DOM.

ng-include

Include a template

ng-inject

Inject dependencies into scope.

ng-keydown

Handler for keydown event

ng-keyup

Handler for keyup event

ng-load

Handler for load event

ng-model

Two-way data binding for form controls.

ng-model-options

Configure update timing and validation behavior for ng-model.

ng-mousedown

Handler for mousedown event

ng-mouseenter

Handler for mouseenter event

ng-mouseleave

Handler for mouseleave event

ng-mousemove

Handler for mousemove event

ng-mouseout

Handler for mouseout event

ng-mouseover

Handler for mouseover event

ng-mouseup

Handler for mouseup event

ng-non-bindable

Stops compilation for element

ng-pointer-capture

Capture active pointer streams on an element

ng-post

Initiates a POST request

ng-show

Show an element when an expression is truthy.

ng-state

Bind state declaration data in templates.

ng-switch

Switch between exclusive template blocks.

ng-view

Render the active routed view.

ng-window-* and ng-document-*

Handler for window and document events