diff --git a/README.md b/README.md index e188e85..b65a7bb 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,11 @@ An Angular module that gives you access to the browsers local storage, **v0.1.1* ##Table of contents: - [Configuration](#configuration) - [setPrefix](#setprefix) - - [setStorageType](setstoragetype) + - [setStorageType](#setstoragetype) + - [setStorageCookie](#setstoragecookie) + - [setStorageCookieDomain](#setstoragecookiedomain) + - [setNotify](#setnotify) + - [Example](#configuration-example) ##Configuration ###setPrefix @@ -29,6 +33,45 @@ myApp.config(function (localStorageServiceProvider) { .setStorageType('sessionStorage'); }); ``` +###setStorageCookie +Set cookie options (usually in case of fallback)
+**expiry:** number of days before cookies expire (0 = does not expire). **default:** `30`
+**path:** the web path the cookie represents. **default:** `'/'` +```js +myApp.config(function (localStorageServiceProvider) { + localStorageServiceProvider + .setStorageCookie(45, ''); +}); +``` +###setStorageCookieDomain +Set for cookie domain
+**No default value** +```js +myApp.config(function (localStorageServiceProvider) { + localStorageServiceProvider + .setStorageCookieDomain(''); +}); +``` +###setNotify +Send signals for each of the following actions:
+**setItem** , default: `true`
+**removeItem** , default: `false` +```js +myApp.config(function (localStorageServiceProvider) { + localStorageServiceProvider + .setNotify(true, true); +}); +``` +###Configuration Example +Using all together +```js +myApp.config(function (localStorageServiceProvider) { + localStorageServiceProvider + .setPrefix('myApp') + .setStorageType('sessionStorage') + .setNotify(true, true) +}); +``` ##Installation: