AngularJS Reference Manual
AngularJS Reference Manual
AngularJS Directives
AngularJS Directives used in this tutorial:
| Directive | Description |
|---|---|
| ng-app | Defines the root element of the application. |
| ng-bind | Binds an HTML element to application data |
| ng-bind-html | Binds the innerHTML of an HTML element to application data, and removes dangerous characters from the HTML string |
| ng-bind-template | Specifies the text content to be replaced by a template |
| ng-blur | Specifies the behavior of the blur event |
| ng-change | An expression to execute when the content changes |
| ng-checked | Specifies whether an element is selected |
| ng-class | Specifies the CSS classes to be used by an HTML element |
| ng-class-even | Similar to ng-class, but only works on even rows |
| ng-class-odd | Similar to ng-class, but only works on odd rows |
| ng-click | Defines the behavior when an element is clicked |
| ng-cloak | Prevents flickering while the application is loading |
| ng-controller | Defines the controller object for the application |
| ng-copy | Defines the behavior of the copy event |
| ng-csp | Modifies the security policy of the content |
| ng-cut | Defines the behavior of the cut event |
| ng-dblclick | Defines the behavior of the double-click event |
| ng-disabled | Specifies whether an element is disabled |
| ng-focus | Specifies the behavior of the focus event |
| ng-form | Specifies that an HTML form inherits from a controller form |
| ng-hide | Hides or shows an HTML element |
| ng-href | for thespecify a link for the element |
| ng-if | remove the HTML element if the condition is false |
| ng-include | include an HTML file in the application |
| ng-init | Define the initial values of the application |
| ng-jq | Define the libraries the application must use, such as: jQuery |
| ng-keydown | Specify the behavior of the keydown event |
| ng-keypress | Specify the behavior of the keypress event |
| ng-keyup | Define the behavior of the key press event |
| ng-list | Convert text to a list (array) |
| ng-model | Bind the value of an HTML controller to application data |
| ng-model-options | Define how to update the model |
| ng-mousedown | Defines the behavior when a mouse button is pressed |
| ng-mouseenter | Defines the behavior when the mouse pointer passes over an element |
| ng-mouseleave | Defines the behavior when the mouse pointer leaves an element |
| ng-mousemove | Defines the behavior when the mouse pointer moves within a specified element |
| ng-mouseover | Specifies the behavior when the mouse pointer is over an element |
| ng-mouseup | Specifies the behavior when the mouse button is released on an element |
| ng-non-bindable | Specifies that an element or its child elements cannot bind data |
| ng-open | Specifies the open attribute of an element |
| ng-options | In |
| ng-paste | Defines the behavior of the paste event |
| ng-pluralize | Displays information according to localization rules |
| ng-readonly | Specifies the readonly attribute of an element |
| ng-repeat | Template for each item in a collection |
| ng-selected | Specifies the selected attribute of an element |
| ng-show | Shows or hides an HTML element |
| ng-src | Specifies |
| ng-srcset | specify |
| ng-style | specify element's style attribute |
| ng-submit | expression to execute when onsubmit event occurs |
| ng-switch | Specifies the condition to display or hide child elements |
| ng-transclude | Specifies the target position for filling |
| ng-value | Specifies the value of the input element |
Filter parsing AngularJs Filters.
AngularJS events
AngularJS supports the following events:
- ng-click
- ng-dbl-click
- ng-mousedown
- ng-mouseenter
- ng-mouseleave
- ng-mousemove
- ng-keydown
- ng-keyup
- ng-keypress
- ng-change
Event parsing: Angular Events.
AngularJS validation attributes
- $dirty
- $invalid
- $error
Validation parsing: Angular Validation.
AngularJS global API
Transform
| API | Description |
|---|---|
| angular.lowercase() | Converts a string to lowercase |
| angular.uppercase() | Converts a string to uppercase |
| angular.copy() | Deep copy of an array or object |
| angular.forEach() | Iteration function for objects or arrays |
Comparison
| API | Description |
|---|---|
| angular.isArray() | Returns true if the reference is an array |
| angular.isDate() | Returns true if the reference is a date |
| angular.isDefined() | Returns true if the reference is defined |
| angular.isElement() | Returns true if the reference is a DOM element |
| angular.isFunction() | Returns true if the reference is a function |
| angular.isNumber() | Returns true if the reference is a number |
| angular.isObject() | Returns true if the reference is an object |
| angular.isString() | Returns true if the reference is a string |
| angular.isUndefined() | Returns true if the reference is undefined |
| angular.equals() | Returns true if two objects are equal |
JSON
| API | Description |
|---|---|
| angular.fromJson() | Deserialize JSON string |
| angular.toJson() | Serialize JSON string |
Basics
| API | Description |
|---|---|
| angular.bootstrap() | Manually start AngularJS |
| angular.element() | Wraps a part of a DOM element or an HTML string and treats it as a jQuery element. |
| angular.module() | Create, register, or retrieve an AngularJS module |
Global API parsing: Angular API