aboutsummaryrefslogtreecommitdiffstats
path: root/docs/content
diff options
context:
space:
mode:
authorIgor Minar2013-06-05 15:30:31 -0700
committerIgor Minar2013-06-06 17:07:12 -0700
commit5599b55b04788c2e327d7551a4a699d75516dd21 (patch)
treedc080ce9639f44056eb6c476fb030923249ce265 /docs/content
parent7a5cfb593f27c28cee545974736632bf8da62fe8 (diff)
downloadangular.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')
-rw-r--r--docs/content/cookbook/deeplinking.ngdoc10
-rw-r--r--docs/content/guide/dev_guide.mvc.understanding_controller.ngdoc2
-rw-r--r--docs/content/guide/dev_guide.mvc.understanding_view.ngdoc2
-rw-r--r--docs/content/guide/dev_guide.services.managing_dependencies.ngdoc2
-rw-r--r--docs/content/guide/dev_guide.templates.ngdoc4
-rw-r--r--docs/content/guide/directive.ngdoc6
6 files changed, 13 insertions, 13 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.
diff --git a/docs/content/guide/dev_guide.mvc.understanding_controller.ngdoc b/docs/content/guide/dev_guide.mvc.understanding_controller.ngdoc
index e3a570d4..2c82f949 100644
--- a/docs/content/guide/dev_guide.mvc.understanding_controller.ngdoc
+++ b/docs/content/guide/dev_guide.mvc.understanding_controller.ngdoc
@@ -84,7 +84,7 @@ instances).
# Associating Controllers with Angular Scope Objects
You can associate controllers with scope objects implicitly via the {@link api/ng.directive:ngController ngController
-directive} or {@link api/ng.$route $route service}.
+directive} or {@link api/ngRoute.$route $route service}.
## Controller Constructor and Methods Example
diff --git a/docs/content/guide/dev_guide.mvc.understanding_view.ngdoc b/docs/content/guide/dev_guide.mvc.understanding_view.ngdoc
index 567437bd..2827cf67 100644
--- a/docs/content/guide/dev_guide.mvc.understanding_view.ngdoc
+++ b/docs/content/guide/dev_guide.mvc.understanding_view.ngdoc
@@ -10,7 +10,7 @@ the DOM based on information in the template, controller and model.
In the Angular implementation of MVC, the view has knowledge of both the model and the controller.
The view knows about the model where two-way data-binding occurs. The view has knowledge of the
controller through Angular directives, such as {@link api/ng.directive:ngController
-ngController} and {@link api/ng.directive:ngView ngView}, and through bindings of this form:
+ngController} and {@link api/ngRoute.directive:ngView ngView}, and through bindings of this form:
`{{someControllerFunction()}}`. In these ways, the view can call functions in an associated
controller function.
diff --git a/docs/content/guide/dev_guide.services.managing_dependencies.ngdoc b/docs/content/guide/dev_guide.services.managing_dependencies.ngdoc
index 6a769ca0..b069f4bb 100644
--- a/docs/content/guide/dev_guide.services.managing_dependencies.ngdoc
+++ b/docs/content/guide/dev_guide.services.managing_dependencies.ngdoc
@@ -91,7 +91,7 @@ Things to notice in this example:
* The `batchLog` service depends on the built-in {@link api/ng.$timeout $timeout} and
{@link api/ng.$log $log} services, and allows messages to be logged into the
`console.log` in batches.
-* The `routeTemplateMonitor` service depends on the built-in {@link api/ng.$route
+* The `routeTemplateMonitor` service depends on the built-in {@link api/ngRoute.$route
$route} service as well as our custom `batchLog` service.
* Both of our services use the factory function signature and array notation for inject annotations
to declare their dependencies. It is important that the order of the string identifiers in the array
diff --git a/docs/content/guide/dev_guide.templates.ngdoc b/docs/content/guide/dev_guide.templates.ngdoc
index 2b4e3ff1..b01b4448 100644
--- a/docs/content/guide/dev_guide.templates.ngdoc
+++ b/docs/content/guide/dev_guide.templates.ngdoc
@@ -41,8 +41,8 @@ with {@link expression expressions}:
In a simple single-page app, the template consists of HTML, CSS, and angular directives contained
in just one HTML file (usually `index.html`). In a more complex app, you can display multiple views
within one main page using "partials", which are segments of template located in separate HTML
-files. You "include" the partials in the main page using the {@link api/ng.$route
-$route} service in conjunction with the {@link api/ng.directive:ngView ngView} directive. An
+files. You "include" the partials in the main page using the {@link api/ngRoute.$route
+$route} service in conjunction with the {@link api/ngRoute.directive:ngView ngView} directive. An
example of this technique is shown in the {@link tutorial/ angular tutorial}, in steps seven and
eight.
diff --git a/docs/content/guide/directive.ngdoc b/docs/content/guide/directive.ngdoc
index 72146125..11adc1f1 100644
--- a/docs/content/guide/directive.ngdoc
+++ b/docs/content/guide/directive.ngdoc
@@ -250,7 +250,7 @@ In this example we will build a directive that displays the current time.
# Writing directives (long version)
-There are different ways to declare a directive. The difference resides in the return
+There are different ways to declare a directive. The difference resides in the return
value of the factory function. You can either return a Directive Definition Object
(see below) that defines the directive properties, or just the postLink function
of such an object (all other properties will have the default values).
@@ -284,7 +284,7 @@ Here's an example directive declared with a Directive Definition Object:
In most cases you will not need such fine control and so the above can be simplified. You can still
return a Directive Definition Object, but only setting the 'compile' function property of the Object,
-and rely on the default values for other properties.
+and rely on the default values for other properties.
Therefore the above can be simplified as:
@@ -462,7 +462,7 @@ The compile function deals with transforming the template DOM. Since most direct
template transformation, it is not used often. Examples that require compile functions are
directives that transform template DOM, such as {@link
api/ng.directive:ngRepeat ngRepeat}, or load the contents
-asynchronously, such as {@link api/ng.directive:ngView ngView}. The
+asynchronously, such as {@link api/ngRoute.directive:ngView ngView}. The
compile function takes the following arguments.
* `tElement` - template element - The element where the directive has been declared. It is