vendor/assets/javascripts/unstable/angular-cookies.js in angularjs-rails-1.2.19 vs vendor/assets/javascripts/unstable/angular-cookies.js in angularjs-rails-1.2.20
- old
+ new
@@ -1,7 +1,7 @@
/**
- * @license AngularJS v1.3.0-beta.14
+ * @license AngularJS v1.3.0-beta.15
* (c) 2010-2014 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window, angular, undefined) {'use strict';
@@ -37,16 +37,17 @@
* Requires the {@link ngCookies `ngCookies`} module to be installed.
*
* @example
*
* ```js
- * function ExampleController($cookies) {
- * // Retrieving a cookie
- * var favoriteCookie = $cookies.myFavorite;
- * // Setting a cookie
- * $cookies.myFavorite = 'oatmeal';
- * }
+ * angular.module('cookiesExample', ['ngCookies'])
+ * .controller('ExampleController', ['$cookies', function($cookies) {
+ * // Retrieving a cookie
+ * var favoriteCookie = $cookies.myFavorite;
+ * // Setting a cookie
+ * $cookies.myFavorite = 'oatmeal';
+ * }]);
* ```
*/
factory('$cookies', ['$rootScope', '$browser', function ($rootScope, $browser) {
var cookies = {},
lastCookies = {},
@@ -140,17 +141,18 @@
* Requires the {@link ngCookies `ngCookies`} module to be installed.
*
* @example
*
* ```js
- * function ExampleController($cookieStore) {
- * // Put cookie
- * $cookieStore.put('myFavorite','oatmeal');
- * // Get cookie
- * var favoriteCookie = $cookieStore.get('myFavorite');
- * // Removing a cookie
- * $cookieStore.remove('myFavorite');
- * }
+ * angular.module('cookieStoreExample', ['ngCookies'])
+ * .controller('ExampleController', ['$cookieStore', function($cookieStore) {
+ * // Put cookie
+ * $cookieStore.put('myFavorite','oatmeal');
+ * // Get cookie
+ * var favoriteCookie = $cookieStore.get('myFavorite');
+ * // Removing a cookie
+ * $cookieStore.remove('myFavorite');
+ * }]);
* ```
*/
factory('$cookieStore', ['$cookies', function($cookies) {
return {