AngularJS Reference Manual
AngularJS directive
The AngularJS directive used in this tutorial:
| instruction | describe |
|---|---|
| ng-app | Defines the root element of the application. |
| ng-bind | Bind HTML elements to application data |
| ng-bind-html | Bind the innerHTML of HTML elements to the application data and remove dangerous characters from the HTML string |
| ng-bind-template | Specify the text content to be replaced with a template |
| ng-blur | Provision of the behavior of the blur event |
| ng-change | Specifies the expression to be executed when the content changes |
| ng-checked | Specifies whether the element is selected |
| ng-class | Specify the CSS class used by HTML elements |
| ng-class-even | Similar to ng-class, but only works on even lines |
| ng-class-odd | Similar to ng-class, but only works on odd lines |
| ng-click | Defines the behavior of an element when it is clicked |
| ng-cloak | Prevent the app from flickering when it is about to load |
| ng-controller | Define the controller object for the application |
| ng-copy | Specify the behavior of copying events |
| ng-csp | Security policy for modifying content |
| ng-cut | Specify the behavior of cutting events |
| ng-dblclick | Specify the behavior of double-click events |
| ng-disabled | Specifies whether an element is disabled |
| ng-focus | Regulations on the behavior that focuses on events |
| ng-form | Specify HTML form inheritance controller form |
| ng-hide | Hide or display HTML elements |
| ng-href | Specify a link for the <a> element |
| ng-if | Remove HTML elements if the condition is false |
| ng-include | Include HTML files in your app |
| ng-init | Define the initialization value of the application |
| ng-jq | Define the library that the application must use, such as: jQuery |
| ng-keydown | Specify the behavior of pressing the key |
| ng-keypress | Specify the behavior of pressing the key |
| ng-keyup | Specify the behavior of releasing the keys |
| ng-list | Convert text to list (array) |
| ng-model | Bind the HTML controller's value to the application data |
| ng-model-options | Specify how to update the model |
| ng-mousedown | Specify the behavior when pressing the mouse button |
| ng-mouseenter | Specifies the behavior of the mouse pointer when it passes through an element |
| ng-mouseleave | Specify the behavior of the mouse pointer when leaving the element |
| ng-mousemove | Specifies the behavior of the mouse pointer when it moves in the specified element |
| ng-mouseover | Specifies the behavior when the mouse pointer is above the element |
| ng-mouseup | Specifies the behavior when the mouse button is released on the element |
| ng-non-bindable | Specifies that elements or child elements cannot bind data |
| ng-open | Specify the open attribute of the element |
| ng-options | Specify <options> in the <select> list |
| ng-paste | Specify the behavior of pasting events |
| ng-pluralize | Display information according to localization rules |
| ng-readonly | The readonly property of the specified element |
| ng-repeat | Define the template for each data in the collection |
| ng-selected | The selected attribute of the specified element |
| ng-show | Show or hide HTML elements |
| ng-src | Specify the src attribute of the <img> element |
| ng-srcset | Specify the srcset attribute of the <img> element |
| ng-style | Specify the style attribute of the element |
| ng-submit | Specifies the expression executed when the onsubmit event occurs |
| ng-switch | Specify the conditions for displaying or hiding child elements |
| ng-transclude | Specify the target position of filling |
| ng-value | Specify the value of the input element |
Filter parses AngularJs filter.
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 analysis: Angular event.
AngularJS Verification Properties
$dirty
$invalid
$error
Verification analysis: Angular verification.
AngularJS Global API
Convert
| API | describe |
|---|---|
| angular.lowercase() | Convert string to lowercase |
| angular.uppercase() | Convert string to uppercase |
| angular.copy() | Deep copy of array or object |
| angular.forEach() | Iterative functions for objects or arrays |
Compare
| API | describe |
|---|---|
| angular.isArray() | Return true if the reference is an array |
| angular.isDate() | Return true if the referenced date |
| angular.isDefined() | Return true if the referenced defined |
| angular.isElement() | Return true if the reference is a DOM element |
| angular.isFunction() | Return true if the referenced function |
| angular.isNumber() | Return true if the referenced number |
| angular.isObject() | Return true if the referenced object |
| angular.isString() | Return true if the referenced string |
| angular.isUndefined() | Return true if the reference is undefined |
| angular.equals() | Return true if two objects are equal |
JSON
| API | describe |
|---|---|
| angular.fromJSON() | Deserialize JSON strings |
| angular.toJSON() | Serialize JSON strings |
Base
| API | describe |
|---|---|
| angular.bootstrap() | Start AngularJS manually |
| angular.element() | Wrap a part of the DOM element or HTML string and process it as a jQuery element. |
| angular.module() | Create, register or retrieve AngularJS modules |
Global API Analysis: Angular API.
The above is a collection of the reference manual for AngularJS. For those who need it, please refer to it.