This repository was archived by the owner on Apr 17, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 733
Expand file tree
/
Copy pathangular.Array.html
More file actions
30 lines (25 loc) · 1.9 KB
/
Copy pathangular.Array.html
File metadata and controls
30 lines (25 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<h1>angular.Array</h1>
<div class="angular-array"><p>A namespace for utility functions for the manipulation of JavaScript Array objects.</p>
<p>These functions are exposed in two ways:</p>
<ul>
<li><p><strong>Angular expressions:</strong> Functions are bound to the Array objects and augment the Array type as
array methods. The names of these methods are prefixed with $ character to minimize naming
collisions. To call a method, invoke myArrayObject.$foo(params).</p>
<p>Because Array type is a subtype of the Object type, all angular.Object functions augment
theArray type in angular expressions as well.</p></li>
<li><p><strong>JavaScript code:</strong> Functions don't augment the Array type and must be invoked as functions of
<code>angular.Array</code> as <code>angular.Array.foo(myArrayObject, params)</code>.</p></li>
</ul>
<p>The following APIs are built-in to the angular Array object:</p>
<ul>
<li><a href="#!/api/angular.Array.add"><code>angular.Array.add()</code></a> - Optionally adds a new element to an array.</li>
<li><a href="#!/api/angular.Array.count"><code>angular.Array.count()</code></a> - Determines the number of elements in an
array.</li>
<li><a href="#!/api/angular.Array.filter"><code>angular.Array.filter()</code></a> - Returns a subset of items as a new array.</li>
<li><a href="#!/api/angular.Array.indexOf"><code>angular.Array.indexOf()</code></a> - Determines the index of an array value.</li>
<li><a href="#!/api/angular.Array.limitTo"><code>angular.Array.limitTo()</code></a> - Creates a new array off the front or
back of an existing array.</li>
<li><a href="#!/api/angular.Array.orderBy"><code>angular.Array.orderBy()</code></a> - Orders array elements</li>
<li><a href="#!/api/angular.Array.remove"><code>angular.Array.remove()</code></a> - Removes array elements</li>
<li><a href="#!/api/angular.Array.sum"><code>angular.Array.sum()</code></a> - Sums the number elements in an array</li>
</ul></div>