Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
docs(ngCookies): added example usage of cookieStore
Browse files Browse the repository at this point in the history
Closes #7278
  • Loading branch information
adrianenriquez authored and caitp committed Apr 28, 2014
1 parent 7d1719e commit 7a543c9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/ngCookies/cookies.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,19 @@ angular.module('ngCookies', ['ng']).
* deserialized by angular's toJson/fromJson.
*
* Requires the {@link ngCookies `ngCookies`} module to be installed.
*
* @example
*
* ```js
* function ExampleController($cookies) {
* // Put cookie
* $cookieStore.put('myFavorite','oatmeal');
* // Get cookie
* var favoriteCookie = $cookieStore.get('myFavorite');
* // Removing a cookie
* $cookieStore.remove('myFavorite');
* }
* ```
*/
factory('$cookieStore', ['$cookies', function($cookies) {

Expand Down

0 comments on commit 7a543c9

Please sign in to comment.