forked from angular/code.angularjs.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathangular.service.$cookieStore.html
31 lines (31 loc) · 1.23 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
<h1>angular.service.$cookieStore</h1>
<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>
<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><h2>Dependencies</h2>
<ul class="dependencies"><li>$cookies</li>
</ul>
<h2>Methods</h2>
<ul class="methods"><li><h3>get(key)</h3>
<p>Returns the value of given cookie key</p><h4>Parameters</h4>
<ul class="parameters"><li><code ng:non-bindable="">key – {string} – </code>
Id to use for lookup.</li>
</ul>
</li>
<li><h3>put(key, value)</h3>
<p>Sets a value for given cookie key</p><h4>Parameters</h4>
<ul class="parameters"><li><code ng:non-bindable="">key – {string} – </code>
Id for the <code>value</code>.</li>
<li><code ng:non-bindable="">value – {Object} – </code>
Value to be stored.</li>
</ul>
</li>
<li><h3>remove(key)</h3>
<p>Remove given cookie</p><h4>Parameters</h4>
<ul class="parameters"><li><code ng:non-bindable="">key – {string} – </code>
Id of the key-value pair to delete.</li>
</ul>
</li>
</ul>