ngCookies.$cookiesProvider

$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

ngCookies.$cookiesProvider.defaults

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.

ngCookies.$cookieStore.get()

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.

ngCookies.$cookieStore.remove()

remove(key); Remove given cookie Parameters Param Type Details key string Id of the key-value pair to delete.

ngCookies.$cookieStore

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

ngCookies.$cookies.put()

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

ngCookies.$cookies.getObject()

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.

ngCookies.$cookies.putObject()

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

ngCookies.$cookies.remove()

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

ngCookies.$cookies.getAll()

getAll(); Returns a key value object with all the cookies Returns Object All cookies