feat(angular1_router): allow component to bind to router
This commit is contained in:

committed by
Igor Minar

parent
c6036435f0
commit
0f22dce036
@ -156,10 +156,11 @@ function ngOutletDirective($animate, $q: ng.IQService, $router) {
|
||||
|
||||
this.controller.$$routeParams = instruction.params;
|
||||
this.controller.$$template =
|
||||
'<' + dashCase(componentName) + '></' + dashCase(componentName) + '>';
|
||||
'<' + dashCase(componentName) + ' router="$$router"></' + dashCase(componentName) + '>';
|
||||
this.controller.$$router = this.router.childRouter(instruction.componentType);
|
||||
|
||||
let newScope = scope.$new();
|
||||
newScope.$$router = this.controller.$$router;
|
||||
|
||||
let clone = $transclude(newScope, clone => {
|
||||
$animate.enter(clone, null, this.currentElement || element);
|
||||
|
Reference in New Issue
Block a user