forked from angular/code.angularjs.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathangular.service.$cookieStore.html
38 lines (38 loc) · 1.47 KB
/
angular.service.$cookieStore.html
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
31
32
33
34
35
36
37
38
<h1>angular.service.$cookieStore</h1>
<div class="angular-service-cookiestore"><fieldset class="workInProgress"><legend>Work in Progress</legend>
This page is currently being revised. It might be incomplete or contain inaccuracies.</fieldset>
<h2>Description</h2>
<div class="description"><p>Provides a key-value (string-object) storage, that is backed by session cookies.
Objects put or retrieved from this storage are automatically serialized or
deserialized by angular's toJson/fromJson.</p></div>
<h2>Dependencies</h2>
<ul class="dependencies"><li>$cookies</li>
</ul>
<h2>Methods</h2>
<ul class="methods"><li><h3>get(key)</h3>
<div class="get-key-"><p>Returns the value of given cookie key</p><h4>Parameters</h4>
<ul class="parameters"><li><code ng:non-bindable="">key – {string} – </code>
<p>Id to use for lookup.</p></li>
</ul>
</div>
</li>
<li><h3>put(key, value)</h3>
<div class="put-key-value-"><p>Sets a value for given cookie key</p><h4>Parameters</h4>
<ul class="parameters"><li><code ng:non-bindable="">key – {string} – </code>
<p>Id for the <code>value</code>.</p></li>
<li><code ng:non-bindable="">value – {Object} – </code>
<p>Value to be stored.</p></li>
</ul>
</div>
</li>
<li><h3>remove(key)</h3>
<div class="remove-key-"><p>Remove given cookie</p><h4>Parameters</h4>
<ul class="parameters"><li><code ng:non-bindable="">key – {string} – </code>
<p>Id of the key-value pair to delete.</p></li>
</ul>
</div>
</li>
</ul>
<h2>Properties</h2>
<ul class="properties"></ul>
</div>