Upgrade to angularjs 1.2.0 rc1
This commit is contained in:
parent
d223dfd662
commit
d6b021bfaf
674 changed files with 79667 additions and 62269 deletions
56
lib/angular/docs/partials/api/ng.$cacheFactory.html
Normal file → Executable file
56
lib/angular/docs/partials/api/ng.$cacheFactory.html
Normal file → Executable file
|
@ -1,25 +1,31 @@
|
|||
<h1><code ng:non-bindable="">$cacheFactory</code>
|
||||
<span class="hint">(service in module <code ng:non-bindable="">ng</code>
|
||||
)</span>
|
||||
<a href="http://github.com/angular/angular.js/tree/v1.2.0rc1/src/ng/cacheFactory.js#L1" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a><a href="http://github.com/angular/angular.js/edit/master/src/ng/cacheFactory.js" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">$cacheFactory</code>
|
||||
<div><span class="hint">service in module <code ng:non-bindable="">ng</code>
|
||||
</span>
|
||||
</div>
|
||||
</h1>
|
||||
<div><a href="http://github.com/angular/angular.js/edit/master/src/ng/cacheFactory.js" class="improve-docs btn btn-primary">Improve this doc</a><h2 id="Description">Description</h2>
|
||||
<div class="description"><p>Factory that constructs cache objects.</p></div>
|
||||
<div><h2 id="Description">Description</h2>
|
||||
<div class="description"><div class="ng-cachefactory-page"><p>Factory that constructs cache objects and gives access to them.</p>
|
||||
<pre class="prettyprint linenums">
|
||||
|
||||
var cache = $cacheFactory('cacheId');
|
||||
expect($cacheFactory.get('cacheId')).toBe(cache);
|
||||
expect($cacheFactory.get('noSuchCacheId')).not.toBeDefined();
|
||||
|
||||
cache.put("key", "value");
|
||||
cache.put("another key", "another value");
|
||||
|
||||
expect(cache.info()).toEqual({id: 'cacheId', size: 2}); // Since we've specified no options on creation
|
||||
|
||||
</pre>
|
||||
</div></div>
|
||||
<h2 id="Usage">Usage</h2>
|
||||
<div class="usage"><pre class="prettyprint linenums">$cacheFactory(cacheId[, options]);</pre>
|
||||
<h3 id="Parameters">Parameters</h3>
|
||||
<ul class="parameters"><li><code ng:non-bindable="">cacheId – {string} – </code>
|
||||
<p>Name or id of the newly created cache.</p></li>
|
||||
<li><code ng:non-bindable="">options<i>(optional)</i> – {object=} – </code>
|
||||
<p>Options object that specifies the cache behavior. Properties:</p>
|
||||
|
||||
<h4 id="parameters">Parameters</h4><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>cacheId</td><td><a href="" class="label type-hint type-hint-string">string</a></td><td><div class="ng-cachefactory-page"><p>Name or id of the newly created cache.</p>
|
||||
</div></td></tr><tr><td>options <div><em>(optional)</em></div></td><td><a href="" class="label type-hint type-hint-object">object</a></td><td><div class="ng-cachefactory-page"><p>Options object that specifies the cache behavior. Properties:</p>
|
||||
<ul>
|
||||
<li><code>{number=}</code> <code>capacity</code> — turns the cache into LRU cache.</li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<h3 id="Returns">Returns</h3>
|
||||
<div class="returns"><code ng:non-bindable="">{object}</code>
|
||||
– <p>Newly created cache object with the following set of methods:</p>
|
||||
|
||||
</div></td></tr></tbody></table><h4 id="returns">Returns</h4><table class="variables-matrix"><tr><td><a href="" class="label type-hint type-hint-object">object</a></td><td><div class="ng-cachefactory-page"><p>Newly created cache object with the following set of methods:</p>
|
||||
<ul>
|
||||
<li><code>{object}</code> <code>info()</code> — Returns id, size, and options of cache.</li>
|
||||
<li><code>{{*}}</code> <code>put({string} key, {*} value)</code> — Puts a new key-value pair into the cache and returns it.</li>
|
||||
|
@ -27,6 +33,22 @@
|
|||
<li><code>{void}</code> <code>remove({string} key)</code> — Removes a key-value pair from the cache.</li>
|
||||
<li><code>{void}</code> <code>removeAll()</code> — Removes all cached values.</li>
|
||||
<li><code>{void}</code> <code>destroy()</code> — Removes references to this cache from $cacheFactory.</li>
|
||||
</ul></div>
|
||||
</ul>
|
||||
</div></td></tr></table></div>
|
||||
<div class="member method"><h2 id="Methods">Methods</h2>
|
||||
<ul class="methods"><li><h3 id="get">get(cacheId)</h3>
|
||||
<div class="get"><div class="ng-cachefactory-get-page"><p>Get access to a cache object by the <code>cacheId</code> used when it was created.</p>
|
||||
</div><h5 id="parameters">Parameters</h5><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>cacheId</td><td><a href="" class="label type-hint type-hint-string">string</a></td><td><div class="ng-cachefactory-get-page"><p>Name or id of a cache to access.</p>
|
||||
</div></td></tr></tbody></table><h5 id="returns">Returns</h5><table class="variables-matrix"><tr><td><a href="" class="label type-hint type-hint-object">object</a></td><td><div class="ng-cachefactory-get-page"><p>Cache object identified by the cacheId or undefined if no such cache.</p>
|
||||
</div></td></tr></table></div>
|
||||
</li>
|
||||
<li><h3 id="info">info()</h3>
|
||||
<div class="info"><div class="ng-cachefactory-info-page"><p>Get information about all the of the caches that have been created</p>
|
||||
</div><h5 id="returns">Returns</h5><table class="variables-matrix"><tr><td><a href="" class="label type-hint type-hint-object">Object</a></td><td><div class="ng-cachefactory-info-page"><ul>
|
||||
<li>key-value map of <code>cacheId</code> to the result of calling <code>cache#info</code></li>
|
||||
</ul>
|
||||
</div></td></tr></table></div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue