vendor/assets/javascripts/angular-cookies.js in angularjs-rails-1.5.8 vs vendor/assets/javascripts/angular-cookies.js in angularjs-rails-1.6.0

- old
+ new

@@ -1,7 +1,7 @@ /** - * @license AngularJS v1.5.8 + * @license AngularJS v1.6.0 * (c) 2010-2016 Google, Inc. http://angularjs.org * License: MIT */ (function(window, angular) {'use strict'; @@ -26,11 +26,11 @@ * @ngdoc provider * @name $cookiesProvider * @description * Use `$cookiesProvider` to change the default behavior of the {@link ngCookies.$cookies $cookies} service. * */ - provider('$cookies', [function $CookiesProvider() { + provider('$cookies', [/** @this */function $CookiesProvider() { /** * @ngdoc property * @name $cookiesProvider#defaults * @description * @@ -49,10 +49,20 @@ * secured connection. * * Note: By default, the address that appears in your `<base>` tag will be used as the path. * This is important so that cookies will be visible for all routes when html5mode is enabled. * + * @example + * + * ```js + * angular.module('cookiesProviderExample', ['ngCookies']) + * .config(['$cookiesProvider', function($cookiesProvider) { + * // Setting default options + * $cookiesProvider.defaults.domain = 'foo.com'; + * $cookiesProvider.defaults.secure = true; + * }]); + * ``` **/ var defaults = this.defaults = {}; function calcOptions(options) { return options ? angular.extend({}, defaults, options) : defaults; @@ -182,24 +192,22 @@ angular.module('ngCookies'). /** * @ngdoc service * @name $cookieStore * @deprecated + * sinceVersion="v1.4.0" + * Please use the {@link ngCookies.$cookies `$cookies`} service instead. + * * @requires $cookies * * @description * Provides a key-value (string-object) storage, that is backed by session cookies. * Objects put or retrieved from this storage are automatically serialized or * deserialized by angular's toJson/fromJson. * * Requires the {@link ngCookies `ngCookies`} module to be installed. * - * <div class="alert alert-danger"> - * **Note:** The $cookieStore service is **deprecated**. - * Please use the {@link ngCookies.$cookies `$cookies`} service instead. - * </div> - * * @example * * ```js * angular.module('cookieStoreExample', ['ngCookies']) * .controller('ExampleController', ['$cookieStore', function($cookieStore) { @@ -297,13 +305,13 @@ // - 300 cookies // - 20 cookies per unique domain // - 4096 bytes per cookie var cookieLength = str.length + 1; if (cookieLength > 4096) { - $log.warn("Cookie '" + name + - "' possibly not set or overflowed because it was too large (" + - cookieLength + " > 4096 bytes)!"); + $log.warn('Cookie \'' + name + + '\' possibly not set or overflowed because it was too large (' + + cookieLength + ' > 4096 bytes)!'); } return str; } @@ -312,10 +320,10 @@ }; } $$CookieWriter.$inject = ['$document', '$log', '$browser']; -angular.module('ngCookies').provider('$$cookieWriter', function $$CookieWriterProvider() { +angular.module('ngCookies').provider('$$cookieWriter', /** @this */ function $$CookieWriterProvider() { this.$get = $$CookieWriter; }); })(window, window.angular);