Wednesday, November 4, 2015

AngularJS - Functions

Ref:-  https://docs.angularjs.org/api/ng/function

angular.lowercase
Converts the specified string to lowercase.

angular.uppercase
Converts the specified string to uppercase.

angular.forEach
Invokes the iterator function once for each item in obj collection, which can be either an object or an array. The iterator function is invoked with iterator(value, key, obj), where value is the value of an object property or an array element, key is the object property key or array element index and obj is the obj itself. Specifying a context for the function is optional

angular.isUndefined
Determines if a reference is undefined.

angular.isDefined
Determines if a reference is defined.

angular.isObject
Determines if a reference is an Object. Unlike typeof in JavaScript, nulls are not considered to be objects. Note that JavaScript arrays are objects.

angular.isString
Determines if a reference is a String.

angular.isNumber
 Determines if a reference is a Number.
 
angular.isDate
 Determines if a value is a date.

angular.isArray
Determines if a reference is an Array.

angular.isFunction
Determines if a reference is a Function.

angular.equals
Determines if two objects or two values are equivalent. Supports value types, regular expressions, arrays and objects.

 angular.copy
 Creates a deep copy of source, which should be an object or an array.


angular.bind
Returns a function which calls function fn bound to self (self becomes the this for fn). You can supply optional args that are prebound to the function. This feature is also known as partial application, as distinguished from function currying.

angular.toJson
Serializes input into a JSON-formatted string. Properties with leading $$ characters will be stripped since angular uses this notation internally.

angular.fromJson
Deserializes a JSON string

angular.bootstrap
Use this function to manually start up angular application.

angular.injector
 Creates an injector object that can be used for retrieving services as well as for dependency injection (see dependency injection).

angular.module

The angular.module is a global place for creating, registering and retrieving Angular modules. All modules (angular core or 3rd party) that should be available to an application must be registered using this mechanism

No comments:

Post a Comment