YouTip LogoYouTip

Angularjs Reference

* * * ## AngularJS Directives The AngularJS directives used in this tutorial: | Directive | Description | | --- | --- | | (#) | Defines the root element of the application. | | (#) | Binds HTML elements to application data. | | (#) | Binds the innerHTML of an HTML element to application data and removes dangerous characters from the HTML string. | | (#) | Specifies the text content to be replaced with a template. | | (#) | Specifies the behavior for the blur event. | | (#) | Specifies the expression to be executed when the content changes. | | (#) | Specifies whether an element is checked. | | (#) | Specifies the CSS class(es) for an HTML element. | | (#) | Similar to ng-class, but only applies to even rows. | | (#) | Similar to ng-class, but only applies to odd rows. | | (#) | Defines the behavior when an element is clicked. | | (#) | Prevents flickering while the application is loading. | | (#) | Defines the controller object for the application. | | (#) | Specifies the behavior for the copy event. | | (#) | Modifies the content security policy. | | (#) | Specifies the behavior for the cut event. | | (#) | Specifies the behavior for the double-click event. | | (#) | Specifies whether an element is disabled. | | (#) | Specifies the behavior for the focus event. | | ng-form | Specifies that an HTML form inherits the controller form. | | (#) | Hides or shows an HTML element. | | (#) | Specifies the link for the element. | | (#) | Removes the HTML element if the condition is false. | | (#) | Includes an HTML file in the application. | | (#) | Defines the initial values for the application. | | ng-jq | Specifies the library that the application must use, e.g., jQuery. | | (#) | Specifies the behavior for the keydown event. | | (#) | Specifies the behavior for the keypress event. | | (#) | Specifies the behavior for the keyup event. | | (#) | Converts text to a list (array). | | (#) | Binds the value of an HTML controller to application data. | | (#) | Specifies how the model is updated. | | (#) | Specifies the behavior when the mouse button is pressed down. | | (#) | Specifies the behavior when the mouse pointer enters an element. | | (#) | Specifies the behavior when the mouse pointer leaves an element. | | (#) | Specifies the behavior when the mouse pointer moves within an element. | | (#) | Specifies the behavior when the mouse pointer is over an element. | | (#) | Specifies the behavior when the mouse button is released over an element. | | (#) | Specifies that the element or its children cannot bind data. | | (#) | Specifies the open attribute of an element. | | (#) | Specifies in a list. | | (#) | Specifies the behavior for the paste event. | | ng-pluralize | Displays information based on localization rules. | | (#) | Specifies the readonly attribute of an element. | | (#) | Defines the template for each item in a collection. | | (#) | Specifies the selected attribute of an element. | | (#) | Shows or hides an HTML element. | | (#) | Specifies the src attribute of an element. | | (#) | Specifies the srcset attribute of an element. | | (#) | Specifies the style attribute of an element. | | (#) | Specifies the expression to be executed when the onsubmit event occurs. | | (#) | Specifies the condition for showing or hiding child elements. | | ng-transclude | Specifies the target location for filling. | | (#) | Specifies the value of an input element. | Filter explanation: (#). * * * ## 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 explanation: (#). * * * ## AngularJS Validation Properties * $dirty * $invalid * $error Validation explanation: (#). * * * ## AngularJS Global API ### Conversion | API | Description | | --- | --- | | angular.lowercase() | Converts a string to lowercase. | | angular.uppercase() | Converts a string to uppercase. | | angular.copy() | Deep copies an array or object. | | angular.forEach() | Iterates over an object or array. | ### 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() | Deserializes a JSON string. | | angular.toJson() | Serializes an object into a JSON string. | ### Basic | API | Description | | --- | --- | | angular.bootstrap() | Manually starts AngularJS. | | angular.element() | Wraps a DOM element or HTML string and treats it as a jQuery element. | | angular.module() | Creates, registers, or retrieves an AngularJS module. | Global API explanation: (#).
← Bootstrap Plugins OverviewAngularjs Examples β†’