AngularJS Filters,Validation & API

Monday, 21 March 2016

AngularJS Filters,Validation & API

AngularJS Filter

Filter Description
currency Format a number to a currency format.
date Format a date to a specified format.
filter Select a subset of items from an array.
json Format an object to a JSON string.
limitTo Limits an array, or a string, into a specified number of elements/characters.
lowercase Format a string to lower case.
number Format a number to a string.
orderBy Orders an array by an expression.
uppercase Format a string to upper case.

AngularJS Validation Properties

  • $dirty
  • $invalid
  • $erro

AngularJS Global API

Converting

API Description
angular.lowercase() Converts a string to lowercase
angular.uppercase() Converts a string to uppercase
angular.copy() Creates a deep copy of an object or an array
angular.forEach() Executes a function for each element in an object or array

Comparing
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 references are equal

JSON
Comparing Description
angular.fromJSON() Deserializes a JSON string
angular.toJSON() Serializes a JSON string
Basic
API Description
angular.bootstrap() Starts AngularJS manually
angular.element() Wraps an HTML element as an jQuery element
angular.module() Creates, registers, or retrieves an AngularJS module

No comments:

Post a Comment