fix(angular1_router): rename `router` component binding to `$router`
The current router is passed to the current component via a binding. To indicate that this is an angular provided object, this commit renames the binding to `$router`. BREAKING CHANGE: The recently added binding of the current router to the current component has been renamed from `router` to `$router`. So now the recommended set up for your bindings in your routed component is: ```js { ... bindings: { $router: '<' } } ```
This commit is contained in:
parent
5586c29492
commit
2548ce86db
|
@ -139,12 +139,8 @@ describe('router', function () {
|
|||
bindings: options.bindings,
|
||||
controller: getController(options),
|
||||
};
|
||||
if (options.template) {
|
||||
definition.template = options.template;
|
||||
}
|
||||
if (options.templateUrl) {
|
||||
definition.templateUrl = options.templateUrl;
|
||||
}
|
||||
if (options.template) definition.template = options.template;
|
||||
if (options.templateUrl) definition.templateUrl = options.templateUrl;
|
||||
|
||||
applyStaticProperties(definition, options);
|
||||
$compileProvider.component(name, definition);
|
||||
|
|
Loading…
Reference in New Issue