angular-docs-cn/modules
Brian Ford 5205a9e65f refactor(angular_1_router): use directives for route targets
BREAKING CHANGE:

Previously, route configuration took a controller constructor function as the value of
`component` in a route definition:

```
$route.config([
  { route: '/', component: MyController }
])
```

Based on the name of the controller, we used to use a componentMapper service to
determine what template to pair with each controller, how to bind the instance to
the $scope.

To make the 1.x router more semantically alligned with Angular 2, we now route to a directive.
Thus a route configuration takes a normalized directive name:

```
$route.config([
  { route: '/', component: 'myDirective' }
])
```

BREAKING CHANGE:

In order to avoid name collisions, lifecycle hooks are now prefixed with `$`. Before:

```
MyController.prototype.onActivate = ...
```

After:

```
MyController.prototype.$onActivate = ...
```

Same for `$canActivate` (which now lives on the directive factory function),
`$canDeactivate`, `$canReuse`, and `$onDeactivate` hooks.
2015-09-21 12:13:07 -07:00
..
angular1_router refactor(angular_1_router): use directives for route targets 2015-09-21 12:13:07 -07:00
angular2 fix(router): use StringWrapper.startsWith 2015-09-21 12:13:07 -07:00
angular2_material refactor(async): replace RxJS with RxNext 2015-09-15 23:44:57 +00:00
benchmarks chore(benchmarks): enable the transformer on the static_tree benchmark 2015-09-11 23:03:29 +00:00
benchmarks_external chore(benchmarks): rename static_tree to static_tree_perf 2015-09-09 03:58:26 +00:00
benchpress chore(build): replace traceur-runtime with es6-shim. 2015-09-14 21:02:29 +00:00
examples refactor(form): misc minor refactoring 2015-09-16 10:34:26 +00:00