put(key, value); Sets a value for given cookie key Parameters Param Type Details key string Id for the value. value Object Value to be stored.
get(key); Returns the value of given cookie key Parameters Param Type Details key string Id to use for lookup. Returns Object Deserialized cookie value, undefined if the cookie does not exist.
service in module ngCookies 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. Requires the ngCookies module to be installed. Note: The $cookieStore service is deprecated. Please use the $cookies service instead. Dependencies $cookies Methods get(key); Returns the value of given cookie key Parameters Param Type Details key string Id
defaults Object containing default options to pass when setting cookies. The object may have following properties: path - {string} - The cookie will be available only for this path and its sub-paths. By default, this is the URL that appears in your <base> tag. domain - {string} - The cookie will be available only for this domain and its sub-domains. For security reasons the user agent will not accept the cookie if the current domain is not a sub-domain of this domain or equal to it.
$cookies provider in module ngCookies Use $cookiesProvider to change the default behavior of the $cookies service. Properties defaults Object containing default options to pass when setting cookies. The object may have following properties: path - {string} - The cookie will be available only for this path and its sub-paths. By default, this is the URL that appears in your <base> tag. domain - {string} - The cookie will be available only for this domain and its sub-domains. F
remove(key, [options]); Remove given cookie Parameters Param Type Details key string Id of the key-value pair to delete. options (optional) Object Options object. See $cookiesProvider.defaults
putObject(key, value, [options]); Serializes and sets a value for given cookie key Parameters Param Type Details key string Id for the value. value Object Value to be stored. options (optional) Object Options object. See $cookiesProvider.defaults
put(key, value, [options]); Sets a value for given cookie key Parameters Param Type Details key string Id for the value. value string Raw value to be stored. options (optional) Object Options object. See $cookiesProvider.defaults
getObject(key); Returns the deserialized value of given cookie key Parameters Param Type Details key string Id to use for lookup. Returns Object Deserialized cookie value.
getAll(); Returns a key value object with all the cookies Returns Object All cookies
Page 22 of 55