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
This commit is contained in:
Peter Bacon Darwin 2016-02-11 12:34:04 -08:00 committed by Pete Bacon Darwin
parent a1c3be21ec
commit cfc1e56dd8
1 changed files with 2 additions and 2 deletions

View File

@ -154,8 +154,8 @@ function ngOutletDirective($animate, $q: ng.IQService, $rootRouter) {
throw new Error('Component is not a string for ' + instruction.urlPath); throw new Error('Component is not a string for ' + instruction.urlPath);
} }
this.controller.$$template = this.controller.$$template = '<' + dashCase(componentName) + ' $router="::$$router"></' +
'<' + dashCase(componentName) + ' $router="$$router"></' + dashCase(componentName) + '>'; dashCase(componentName) + '>';
this.controller.$$router = this.router.childRouter(instruction.componentType); this.controller.$$router = this.router.childRouter(instruction.componentType);
this.controller.$$outlet = this; this.controller.$$outlet = this;