diff options
| author | Dean Sofer | 2013-01-25 02:24:50 -0800 | 
|---|---|---|
| committer | Igor Minar | 2013-01-29 16:17:12 -0800 | 
| commit | 971d97e2ec2767631242fbffc4a17e7f4ce2f3a6 (patch) | |
| tree | e2cc4c4bcfd8306e3348a12e5639f16113241d48 /src | |
| parent | 559d5efc0448c213e9b8410bd50b6981f8f364d4 (diff) | |
| download | angular.js-971d97e2ec2767631242fbffc4a17e7f4ce2f3a6.tar.bz2 | |
docs($cookies): added example to $cookies api docs
Better than nothing.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ngCookies/cookies.js | 12 | 
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ngCookies/cookies.js b/src/ngCookies/cookies.js index 752e50de..8b46973f 100644 --- a/src/ngCookies/cookies.js +++ b/src/ngCookies/cookies.js @@ -19,6 +19,18 @@ angular.module('ngCookies', ['ng']).     * this object, new cookies are created/deleted at the end of current $eval.     *     * @example +   <doc:example> +     <doc:source> +       <script> +         function ExampleController($cookies) { +           // Retrieving a cookie +           var favoriteCookie = $cookies.myFavorite; +           // Setting a cookie +           $cookies.myFavorite = 'oatmeal'; +         } +       </script> +     </doc:source> +   </doc:example>     */     factory('$cookies', ['$rootScope', '$browser', function ($rootScope, $browser) {        var cookies = {},  | 
