English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

AngularJS Reference Manual

AngularJS Directives

AngularJS directives used in this tutorial:

DirectiveDescription
ng-appDefine the root element of the application.
ng-bindBind an HTML element to application data
ng-bind-htmlBind the innerHTML of an HTML element to application data, and remove dangerous characters from the HTML string
ng-bind-templateSpecify the text content to be replaced by the template
ng-blurSpecify the behavior of the blur event
ng-changeSpecify the expression to be executed when the content changes
ng-checkedSpecify whether an element is selected
ng-classSpecify the CSS class used by the HTML element
ng-class-evenSimilar to ng-class, but only on even rows
ng-class-oddSimilar to ng-class, but only on odd rows
ng-clickDefine the behavior of an element when it is clicked
ng-cloakPrevent the application from blinking when it is about to load
ng-controllerDefine the controller object of the application
ng-copyDefine the behavior of the copy event
ng-cspModify the content security policy
ng-cutDefine the behavior of the cut event
ng-dblclickDefine the behavior of the double-click event
ng-disabledSpecify whether an element is disabled
ng-focusDefine the behavior of the focus event
ng-formSpecify that the HTML form inherits the controller form
ng-hideHide or show HTML elements
ng-hrefSpecify the link for the <a> element
ng-ifRemove HTML elements if the condition is false
ng-includeInclude HTML files in the application
ng-initDefine the initial values of the application
ng-jqDefine the libraries that the application must use, such as: jQuery
ng-keydownDefine the behavior of the event when a key is pressed
ng-keypressDefine the behavior of the event when a key is pressed
ng-keyupDefine the behavior of the event when a key is released
ng-listConvert text to a list (array)
ng-modelBind the value of an HTML controller to application data
ng-model-optionsDefine how to update the model
ng-mousedownDefine the behavior when a mouse button is pressed
ng-mouseenterDefine the behavior of the mouse pointer when it passes through an element
ng-mouseleaveDefine the behavior of the mouse pointer when it leaves an element
ng-mousemoveDefine the behavior of the mouse pointer when moving over a specified element
ng-mouseoverSpecify the behavior when the mouse pointer is above the element
ng-mouseupSpecify the behavior when the mouse button is released on the element
ng-non-bindableSpecify that the element or child elements cannot bind data
ng-openSpecify the open attribute of the element
ng-optionsSpecify <options> in the <select> list
ng-pasteSpecify the behavior of the paste event
ng-pluralizeDisplay information according to localization rules
ng-readonlySpecify the readonly attribute of the element
ng-repeatDefine the template for each item of data in the set
ng-selectedSpecify the selected attribute of the element
ng-showShow or hide HTML elements
ng-srcSpecify the src attribute of the <img> element
ng-srcsetSpecify the srcset attribute of the <img> element
ng-styleSpecify the style attribute of the element
ng-submitSpecify the expression to be executed when the onsubmit event occurs
ng-switchSpecify the condition for displaying or hiding child elements
ng-transcludeSpecify the target position for filling
ng-valueSpecify 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

Conversion

APIDescription
angular.lowercase()Convert a string to lowercase
angular.uppercase()Convert a string to uppercase
angular.copy()Deep copy of arrays or objects
angular.forEach()Iteration function for objects or arrays

Comparison

APIDescription
angular.isArray()If the reference is an array, return true
angular.isDate()If the reference is a date, return true
angular.isDefined()If the reference is defined, return true
angular.isElement()If the reference is a DOM element, return true
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

APIDescription
angular.fromJson()Deserialize JSON string
angular.toJson()Serialize JSON string

Basic

APIDescription
angular.bootstrap()Manually Start AngularJS
angular.element()Wraps a part of DOM element or HTML string and treats it as a jQuery element.
angular.module()Create, register, or retrieve AngularJS modules

Global API Parsing :Angular API.