fix(animations): ensure animation callbacks are fired for embedded views
This commit is contained in:

committed by
Martin Probst

parent
99c0a7fae2
commit
562c8263dc
@ -486,10 +486,13 @@ class _AnimationTemplatePropertyVisitor implements t.TemplateAstVisitor {
|
||||
t.templateVisitAll(this, ast.children);
|
||||
}
|
||||
|
||||
visitEmbeddedTemplate(ast: t.EmbeddedTemplateAst, ctx: any): any {
|
||||
t.templateVisitAll(this, ast.children);
|
||||
}
|
||||
|
||||
visitEvent(ast: t.BoundEventAst, ctx: any): any {}
|
||||
visitBoundText(ast: t.BoundTextAst, ctx: any): any {}
|
||||
visitText(ast: t.TextAst, ctx: any): any {}
|
||||
visitEmbeddedTemplate(ast: t.EmbeddedTemplateAst, ctx: any): any {}
|
||||
visitNgContent(ast: t.NgContentAst, ctx: any): any {}
|
||||
visitAttr(ast: t.AttrAst, ctx: any): any {}
|
||||
visitDirective(ast: t.DirectiveAst, ctx: any): any {}
|
||||
|
@ -28,7 +28,7 @@ class ViewBinderVisitor implements TemplateAstVisitor {
|
||||
private _nodeIndex: number = 0;
|
||||
private _animationOutputsMap: {[key: string]: AnimationOutput} = {};
|
||||
|
||||
constructor(public view: CompileView, animationOutputs: AnimationOutput[]) {
|
||||
constructor(public view: CompileView, public animationOutputs: AnimationOutput[]) {
|
||||
animationOutputs.forEach(
|
||||
entry => { this._animationOutputsMap[entry.fullPropertyName] = entry; });
|
||||
}
|
||||
@ -108,7 +108,7 @@ class ViewBinderVisitor implements TemplateAstVisitor {
|
||||
var providerInstance = compileElement.instances.get(providerAst.token.reference);
|
||||
bindInjectableDestroyLifecycleCallbacks(providerAst, providerInstance, compileElement);
|
||||
});
|
||||
bindView(compileElement.embeddedView, ast.children, []);
|
||||
bindView(compileElement.embeddedView, ast.children, this.animationOutputs);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user