test/lib/angular/angular-cookies.js in angularjs-rails-resource-0.1.4 vs test/lib/angular/angular-cookies.js in angularjs-rails-resource-0.1.5

- old
+ new

@@ -1,7 +1,7 @@ /** - * @license AngularJS v1.0.2 + * @license AngularJS v1.1.4 * (c) 2010-2012 Google, Inc. http://angularjs.org * License: MIT */ (function(window, angular, undefined) { 'use strict'; @@ -23,10 +23,22 @@ * * Only a simple Object is exposed and by adding or removing properties to/from * 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 = {}, lastCookies = {}, lastBrowserCookies, @@ -165,7 +177,8 @@ delete $cookies[key]; } }; }]); + })(window, window.angular);