fix(render): recurse into components/embedded templates not until all elements in a view have been visited

Fixes #4551
Closes #4601
This commit is contained in:
Tobias Bosch
2015-10-07 17:15:12 -07:00
parent ff77230edb
commit 6d4bd5d901
11 changed files with 294 additions and 133 deletions

View File

@ -72,14 +72,14 @@ export function text(value: string, isBound: boolean, ngContentIndex: number): T
export class NgContentCmd implements TemplateCmd, RenderNgContentCmd {
isBound: boolean = false;
constructor(public ngContentIndex: number) {}
constructor(public index: number, public ngContentIndex: number) {}
visit(visitor: RenderCommandVisitor, context: any): any {
return visitor.visitNgContent(this, context);
}
}
export function ngContent(ngContentIndex: number): NgContentCmd {
return new NgContentCmd(ngContentIndex);
export function ngContent(index: number, ngContentIndex: number): NgContentCmd {
return new NgContentCmd(index, ngContentIndex);
}
export interface IBeginElementCmd extends TemplateCmd, RenderBeginElementCmd {