update(cookie): set method with a third parameter (#9519)

Added to the ‘set’ method a third parameter which is daysToExpiry,
which represent the expiration on the cookie in days
This commit is contained in:
stunaz
2016-06-02 17:41:42 +02:00
committed by Masahiro Wakame
parent a50c292dc1
commit e41aa98022

View File

@@ -56,6 +56,15 @@ declare namespace angular.local.storage {
* @param val
*/
set(key:string, val:string):boolean;
/**
* Directly adds a value to cookies with an expiration.
* Note: Typically used as a fallback if local storage is not supported.
* Returns: Boolean
* @param key
* @param val
* @param daysToExpiry
*/
set(key:string, val:string, daysToExpiry:number):boolean;
/**
* Directly get a value from a cookie.
* Returns: value from local storage