aboutsummaryrefslogtreecommitdiffstats
path: root/src/ngRoute/route.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/ngRoute/route.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/ngRoute/route.js')
-rw-r--r--src/ngRoute/route.js22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/ngRoute/route.js b/src/ngRoute/route.js
index 117e7abf..c487d6f1 100644
--- a/src/ngRoute/route.js
+++ b/src/ngRoute/route.js
@@ -5,17 +5,11 @@
* @name ngRoute
* @description
*
- * ngRoute
- * =========
+ * # ngRoute
*
- * The ngRoute module provides routing and deeplinking services and directives for angular apps.
+ * The `ngRoute` module provides routing and deeplinking services and directives for angular apps.
*
- * To make use of routing with AngularJS, the `angular-route.js` JavaScript file must be included into your application
- * and the `ngRoute` module must be included as a dependency.
- *
- * <pre>
- * angular.module('App', ['ngRoute']);
- * </pre>
+ * {@installModule route}
*
*/
@@ -30,6 +24,8 @@ var ngRouteModule = angular.module('ngRoute', ['ng']).
* @description
*
* Used for configuring routes. See {@link ngRoute.$route $route} for an example.
+ *
+ * Requires the {@link ngRoute `ngRoute`} module to be installed.
*/
function $RouteProvider(){
var routes = {};
@@ -231,13 +227,15 @@ function $RouteProvider(){
* @property {Array.<Object>} routes Array of all configured routes.
*
* @description
- * Is used for deep-linking URLs to controllers and views (HTML partials).
+ * `$route` is used for deep-linking URLs to controllers and views (HTML partials).
* It watches `$location.url()` and tries to map the path to an existing route definition.
*
+ * Requires the {@link ngRoute `ngRoute`} module to be installed.
+ *
* You can define routes through {@link ngRoute.$routeProvider $routeProvider}'s API.
*
- * The `$route` service is typically used in conjunction with {@link ngRoute.directive:ngView ngView}
- * directive and the {@link ngRoute.$routeParams $routeParams} service.
+ * The `$route` service is typically used in conjunction with the {@link ngRoute.directive:ngView `ngView`}
+ * directive and the {@link ngRoute.$routeParams `$routeParams`} service.
*
* @example
This example shows how changing the URL hash causes the `$route` to match a route against the