From ae7393db3d99a7ac223ae917129cccd9f49888e3 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Sun, 27 Jan 2013 04:15:53 +0100 Subject: merged the angularjs branch --- .../docs/partials/api/angular.forEach.html | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 3rdparty/js/angular-1.0.2/docs/partials/api/angular.forEach.html (limited to '3rdparty/js/angular-1.0.2/docs/partials/api/angular.forEach.html') diff --git a/3rdparty/js/angular-1.0.2/docs/partials/api/angular.forEach.html b/3rdparty/js/angular-1.0.2/docs/partials/api/angular.forEach.html new file mode 100644 index 000000000..2dd89a8ba --- /dev/null +++ b/3rdparty/js/angular-1.0.2/docs/partials/api/angular.forEach.html @@ -0,0 +1,35 @@ +

angular.forEach +(API in module ng +) +

+

Description

+

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), where value +is the value of an object property or an array element and key is the object property key or +array element index. Specifying a context for the function is optional.

+ +

Note: this function was previously known as angular.foreach.

+ +
+     var values = {name: 'misko', gender: 'male'};
+     var log = [];
+     angular.forEach(values, function(value, key){
+       this.push(key + ': ' + value);
+     }, log);
+     expect(log).toEqual(['name: misko', 'gender:male']);
+   
+

Usage

+
angular.forEach(obj, iterator[, context]);
+

Parameters

+
  • obj – {Object|Array} – +

    Object to iterate over.

  • +
  • iterator – {Function} – +

    Iterator function.

  • +
  • context(optional) – {Object=} – +

    Object to become context (this) for the iterator function.

  • +
+

Returns

+
{Object|Array} +–

Reference to obj.

+
+
-- cgit v1.2.3