Functions Flashcards

1
Q

angular.lowercase

A

Converts the specified string to lowercase.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

angular.uppercase

A

Converts the specified string to uppercase.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

angular.forEach

A

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 theobj itself. Specifying a context for the function is optional.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

angular.extend

A

Extends the destination object dst by copying own enumerable properties from the src object(s) to dst. You can specify multiple src objects. If you want to preserve original objects, you can do so by passing an empty object as the target: var object = angular.extend({}, object1, object2).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

angular.merge

A

Deeply extends the destination object dst by copying own enumerable properties from the src object(s) to dst. You can specify multiple src objects. If you want to preserve original objects, you can do so by passing an empty object as the target: var object = angular.merge({}, object1, object2).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

angular.noop

A
A function that performs no operations. This function can be useful when writing code in the functional style.
function foo(callback) {
  var result = calculateResult();
  (callback || angular.noop)(result);
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

angular.identity

A

A function that returns its first argument. This function is useful when writing code in the functional style.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

angular.isUndefined

A

Determines if a reference is undefined.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

angular.isDefined

A

Determines if a reference is defined.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

angular.isObject

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

angular.isString

A

Determines if a reference is a String.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

angular.isNumber

A

Determines if a reference is a Number.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

angular.isDate

A

Determines if a value is a date.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

angular.isArray

A

Determines if a reference is an Array.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

angular.isFunction

A

Determines if a reference is a Function.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

angular.isElement

A

Determines if a reference is a DOM element (or wrapped jQuery element).

17
Q

angular.copy

A

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

18
Q

angular.equals

A

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

19
Q

angular.bind

A

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.

20
Q

angular.toJson

A

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

21
Q

angular.fromJson

A

Deserializes a JSON string.

22
Q

angular.bootstrap

A

Use this function to manually start up angular application.

23
Q

angular.reloadWithDebugInfo

A

Use this function to reload the current application with debug information turned on. This takes precedence over a call to $compileProvider.debugInfoEnabled(false).

24
Q

angular.injector

A

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

25
Q

angular.element

A

Wraps a raw DOM element or HTML string as a jQuery element.

26
Q

angular.module

A

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.