AngularJS Reference Manual
AngularJS directives
AngularJS directives used in this tutorial:
Directive | Description |
---|---|
ng-app | Defines the root element of the application. |
ng-bind | Bind HTML elements to application data |
ng-bind-html | Bind the innerHTML of the HTML element to the application data and remove dangerous characters from the HTML string |
ng-bind-template | Specifies that template replacement should be used The text content |
ng-blur | Specifies the behavior of the blur event |
ng-change | Specifies an expression to be executed when the content changes |
ng-checked | Specifies whether the element is checked |
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 rows |
ng-click | Define the behavior when an element is clicked |
ng-cloak | Prevent the app from flickering when it is about to load |
ng-controller | Define the controller object of the application |
ng-copy | Specify the behavior of the copy event |
ng-csp | Modify content security policy |
ng-cut | Specify the behavior of cut events |
ng-dblclick | Specifies the behavior of a double-click event |
ng-disabled | Specifies whether an element is Disable |
ng-focus | Specify the behavior of focus events |
ng-form | Specify HTML Form inheritance controller form |
ng-hide | Hide or show HTML elements |
ng-href | Specify a link for the <a> element |
ng-if | Remove the HTML element if the condition is false |
ng-include | Include HTML files in the application |
ng-init | Define the initialization values of the application |
ng-jq | Define the library that the application must use, such as: jQuery |
ng-keydown | Specifies that the key is pressed The behavior of the event |
ng-keypress | Specifies the behavior of the key press event |
ng-keyup | Specify the behavior of the key release event |
ng-list | Convert text to a list (array) |
ng-model | Bind the value of the HTML controller to the application data |
ng-model-options | Specify how to update the model |
ng-mousedown | Specifies the behavior when the mouse button is pressed |
Specifies the behavior of the mouse pointer when the mouse button is pressed Behavior when passing the element | |
Specifies the behavior when the mouse pointer leaves the element | |
Specifies the behavior of the mouse pointer when moving within the specified element | |
Specifies the behavior of the mouse pointer when it is over the element | |
Specifies the behavior when the mouse button is released on an element | |
Specify that elements or sub-elements cannot be bound to data | |
Specify the open attribute of the element | |
ng-options | Specify <options> in the <select> list |
ng-paste | Specify paste Behavior of events |
ng-pluralize | Display information according to localization rules |
ng-readonly | Specify the readonly attribute of the element |
ng-repeat | Define the template for each item of data in the collection |
ng-selected | Specify the selected attribute of the element |
ng-show | Show or hide the HTML element |
ng -src | Specify the src attribute of the <img> element |
ng-srcset | Specify the srcset attribute of the <img> element |
ng-style | Specifies the style attribute of the element |
ng-submit | Specifies that the onsubmit event will be executed when the event occurs The expression |
ng-switch | specifies the conditions for showing or hiding child elements |
ng-transclude | Specify the target position of filling |
ng-value | Specify the value of the input element |
Filter The processor parses 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 analysis: Angular event.
AngularJS Validation Properties
$dirty
$invalid
$error
Verification analysis: Angular verification.
AngularJS Global API
Conversion
Description | |
---|---|
Convert the string to lowercase | |
Convert the string to uppercase | |
Array or object deep copy | |
Iteration function of object or array |
API | Description |
---|---|
Returns true if the reference is an array | |
Returns true if the reference is a date | |
Returns true if the reference is defined | |
Returns true if the reference is a DOM element | |
Returns true if the referenced function is | |
If the reference is a number, return true | |
If the reference is an object, return true | |
Returns true if the reference is a string | |
Returns true if the reference is undefined | |
Returns true if the two objects are equal |
Description | |
---|---|
Deserialize JSON string | |
Serialize JSON string |
Description | |
---|---|
Manually start AngularJS | |
Wraps a part of the DOM element or HTML string and processes it as a jQuery element. | |
Create, register or retrieve an AngularJS module |