aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/cookieStore.js
diff options
context:
space:
mode:
authorMisko Hevery2012-03-26 16:22:06 -0700
committerMisko Hevery2012-03-28 11:16:36 -0700
commit7b22d59b4a16d5c50c2eee054178ba17f8038880 (patch)
tree174f4d18d3545ea9c7e2e569a82df17b8ee0d6a9 /src/ng/cookieStore.js
parent798bca62c6f64775b85deda3713e7b6bcc7a4b4d (diff)
downloadangular.js-7b22d59b4a16d5c50c2eee054178ba17f8038880.tar.bz2
chore(ngCookies): moved to module
Diffstat (limited to 'src/ng/cookieStore.js')
-rw-r--r--src/ng/cookieStore.js64
1 files changed, 0 insertions, 64 deletions
diff --git a/src/ng/cookieStore.js b/src/ng/cookieStore.js
deleted file mode 100644
index e6b7cd21..00000000
--- a/src/ng/cookieStore.js
+++ /dev/null
@@ -1,64 +0,0 @@
-'use strict';
-
-/**
- * @ngdoc object
- * @name angular.module.ng.$cookieStore
- * @requires $cookies
- *
- * @description
- * 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.
- * @example
- */
-function $CookieStoreProvider(){
- this.$get = ['$cookies', function($cookies) {
-
- return {
- /**
- * @ngdoc method
- * @name angular.module.ng.$cookieStore#get
- * @methodOf angular.module.ng.$cookieStore
- *
- * @description
- * Returns the value of given cookie key
- *
- * @param {string} key Id to use for lookup.
- * @returns {Object} Deserialized cookie value.
- */
- get: function(key) {
- return fromJson($cookies[key]);
- },
-
- /**
- * @ngdoc method
- * @name angular.module.ng.$cookieStore#put
- * @methodOf angular.module.ng.$cookieStore
- *
- * @description
- * Sets a value for given cookie key
- *
- * @param {string} key Id for the `value`.
- * @param {Object} value Value to be stored.
- */
- put: function(key, value) {
- $cookies[key] = toJson(value);
- },
-
- /**
- * @ngdoc method
- * @name angular.module.ng.$cookieStore#remove
- * @methodOf angular.module.ng.$cookieStore
- *
- * @description
- * Remove given cookie
- *
- * @param {string} key Id of the key-value pair to delete.
- */
- remove: function(key) {
- delete $cookies[key];
- }
- };
-
- }];
-}