From 1174473e9c0f308c010795bf72e0f471bdcc953f Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Wed, 10 Feb 2016 17:00:34 -0800 Subject: [PATCH] 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: '<' } } ``` --- modules/angular1_router/test/integration/router_spec.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/angular1_router/test/integration/router_spec.js b/modules/angular1_router/test/integration/router_spec.js index 9ef4224545..81218edeb4 100644 --- a/modules/angular1_router/test/integration/router_spec.js +++ b/modules/angular1_router/test/integration/router_spec.js @@ -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);