diff options
| author | Igor Minar | 2013-06-05 15:30:31 -0700 | 
|---|---|---|
| committer | Igor Minar | 2013-06-06 17:07:12 -0700 | 
| commit | 5599b55b04788c2e327d7551a4a699d75516dd21 (patch) | |
| tree | dc080ce9639f44056eb6c476fb030923249ce265 /docs/content/cookbook/deeplinking.ngdoc | |
| parent | 7a5cfb593f27c28cee545974736632bf8da62fe8 (diff) | |
| download | angular.js-5599b55b04788c2e327d7551a4a699d75516dd21.tar.bz2 | |
refactor($route): pull $route and friends into angular-route.js
$route, $routeParams and ngView have been pulled from core angular.js
to angular-route.js/ngRoute module.
This is was done to in order keep the core focused on most commonly
used functionality and allow community routers to be freely used
instead of $route service.
There is no need to panic, angular-route will keep on being supported
by the angular team.
Note: I'm intentionally not fixing tutorial links. Tutorial will need
bigger changes and those should be done when we update tutorial to
1.2.
BREAKING CHANGE: applications that use $route will now need to load
angular-route.js file and define dependency on ngRoute module.
Before:
```
...
<script src="angular.js"></script>
...
var myApp = angular.module('myApp', ['someOtherModule']);
...
```
After:
```
...
<script src="angular.js"></script>
<script src="angular-route.js"></script>
...
var myApp = angular.module('myApp', ['ngRoute', 'someOtherModule']);
...
```
Closes #2804
Diffstat (limited to 'docs/content/cookbook/deeplinking.ngdoc')
| -rw-r--r-- | docs/content/cookbook/deeplinking.ngdoc | 10 | 
1 files changed, 5 insertions, 5 deletions
| diff --git a/docs/content/cookbook/deeplinking.ngdoc b/docs/content/cookbook/deeplinking.ngdoc index 2e22360e..a6fd4852 100644 --- a/docs/content/cookbook/deeplinking.ngdoc +++ b/docs/content/cookbook/deeplinking.ngdoc @@ -30,9 +30,9 @@ In this example we have a simple app which consist of two screens:  * Welcome: url `welcome` Show the user contact information.  * Settings: url `settings` Show an edit screen for user contact information. -<example module="deepLinking" deps="angular-sanitize.js"> +<example module="deepLinking" deps="angular-route.js, angular-sanitize.js">   <file name="script.js"> -   angular.module('deepLinking', ['ngSanitize']) +   angular.module('deepLinking', ['ngRoute', 'ngSanitize'])       .config(function($routeProvider) {          $routeProvider.            when("/welcome",  {templateUrl:'welcome.html',  controller:WelcomeCntl}). @@ -141,11 +141,11 @@ In this example we have a simple app which consist of two screens:  # Things to notice  * Routes are defined in the `AppCntl` class. The initialization of the controller causes the -  initialization of the {@link api/ng.$route $route} service with the proper URL +  initialization of the {@link api/ngRoute.$route $route} service with the proper URL    routes. -* The  {@link api/ng.$route $route} service then watches the URL and instantiates the +* The  {@link api/ngRoute.$route $route} service then watches the URL and instantiates the    appropriate controller when the URL changes. -* The  {@link api/ng.directive:ngView ngView} widget loads the +* The  {@link api/ngRoute.directive:ngView ngView} widget loads the    view when the URL changes. It also sets the view scope to the newly instantiated controller.  * Changing the URL is sufficient to change the controller and view. It makes no difference whether    the URL is changed programatically or by the user. | 
