diff --git a/src/ngCookies/cookies.js b/src/ngCookies/cookies.js index aed65b1859c6..547a781d995e 100644 --- a/src/ngCookies/cookies.js +++ b/src/ngCookies/cookies.js @@ -46,6 +46,16 @@ angular.module('ngCookies', ['ng']). * Note: By default, the address that appears in your `` 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 = {};