aboutsummaryrefslogtreecommitdiffstats
path: root/src/ngCookies/cookies.js
diff options
context:
space:
mode:
authorBrian Ford2013-08-22 12:32:42 -0700
committerBrian Ford2013-08-22 16:55:54 -0700
commit57c43dd3762ea665125bff7e4727bce06a225b32 (patch)
tree5002413ad53358a509d881f7999903e01c51f124 /src/ngCookies/cookies.js
parent99175f429417318e2087a92dd21bc8d5351c97a3 (diff)
downloadangular.js-57c43dd3762ea665125bff7e4727bce06a225b32.tar.bz2
docs(module): improve the installation instructions for optional modules
Currently, the documentation does a bad job of explaining the distinction between the services that it provides, and the module itself. Furthermore, the instructions for using optional modules are inconsistent or missing. This commit addresses the problem by ading a new `{@installModule foo}` annotation to the docs generator that inlines the appropriate instructions based on the name of the module.
Diffstat (limited to 'src/ngCookies/cookies.js')
-rw-r--r--src/ngCookies/cookies.js25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/ngCookies/cookies.js b/src/ngCookies/cookies.js
index 7309b558..2f9dd333 100644
--- a/src/ngCookies/cookies.js
+++ b/src/ngCookies/cookies.js
@@ -3,6 +3,17 @@
/**
* @ngdoc overview
* @name ngCookies
+ * @description
+ *
+ * # ngCookies
+ *
+ * Provides the {@link ngCookies.$cookies `$cookies`} and
+ * {@link ngCookies.$cookieStore `$cookieStore`} services.
+ *
+ * {@installModule cookies}
+ *
+ * See {@link ngCookies.$cookies `$cookies`} and
+ * {@link ngCookies.$cookieStore `$cookieStore`} for usage.
*/
@@ -18,16 +29,7 @@ angular.module('ngCookies', ['ng']).
* 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.
*
- * # Installation
- * To use $cookies make sure you have included the `angular-cookies.js` that comes in Angular
- * package. You can also find this file on Google CDN, bower as well as at
- * {@link http://code.angularjs.org/ code.angularjs.org}.
- *
- * Finally load the module in your application:
- *
- * angular.module('app', ['ngCookies']);
- *
- * and you are ready to get started!
+ * Requires the {@link ngCookies `ngCookies`} module to be installed.
*
* @example
<doc:example>
@@ -133,6 +135,9 @@ angular.module('ngCookies', ['ng']).
* 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.
+ *
* @example
*/
factory('$cookieStore', ['$cookies', function($cookies) {