From e41aa98022f6d1d2edab13dd580976555986d4d2 Mon Sep 17 00:00:00 2001 From: stunaz Date: Thu, 2 Jun 2016 17:41:42 +0200 Subject: [PATCH] update(cookie): set method with a third parameter (#9519) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added to the ‘set’ method a third parameter which is daysToExpiry, which represent the expiration on the cookie in days --- angular-local-storage/angular-local-storage.d.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/angular-local-storage/angular-local-storage.d.ts b/angular-local-storage/angular-local-storage.d.ts index b2bcf377d2..7efc681491 100644 --- a/angular-local-storage/angular-local-storage.d.ts +++ b/angular-local-storage/angular-local-storage.d.ts @@ -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