From cfc1e56dd8e085069d9424701f0f395c88d342ac Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Thu, 11 Feb 2016 12:34:04 -0800 Subject: [PATCH] refact(angular1_router): make the `$$router` binding one-time This binding is never going to change so we can make it a one-time binding Closes #6978 --- modules/angular1_router/src/ng_outlet.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/angular1_router/src/ng_outlet.ts b/modules/angular1_router/src/ng_outlet.ts index 1fdfeac150..f6e346014a 100644 --- a/modules/angular1_router/src/ng_outlet.ts +++ b/modules/angular1_router/src/ng_outlet.ts @@ -154,8 +154,8 @@ function ngOutletDirective($animate, $q: ng.IQService, $rootRouter) { throw new Error('Component is not a string for ' + instruction.urlPath); } - this.controller.$$template = - '<' + dashCase(componentName) + ' $router="$$router">'; + this.controller.$$template = '<' + dashCase(componentName) + ' $router="::$$router">'; this.controller.$$router = this.router.childRouter(instruction.componentType); this.controller.$$outlet = this;