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/guide/directive.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/guide/directive.ngdoc')
| -rw-r--r-- | docs/content/guide/directive.ngdoc | 6 | 
1 files changed, 3 insertions, 3 deletions
| 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 | 
