fix(query): set fixed @ViewChild / @ContentChild right after the view is created

This is needed to have a true replacement of the previous
`DynamicComponentLoader.loadNextToLocation`, so that components
can be loaded into the view before change detection runs.

Closes #9040
This commit is contained in:
Tobias Bosch
2016-06-06 08:16:45 -07:00
parent 8847580fd7
commit c3d2459a4e
4 changed files with 54 additions and 4 deletions

View File

@ -230,7 +230,8 @@ export class CompileElement extends CompileNode {
this._queries.values().forEach(
(queries) =>
queries.forEach((query) => query.afterChildren(this.view.updateContentQueriesMethod)));
queries.forEach((query) => query.afterChildren(this.view.createMethod,
this.view.updateContentQueriesMethod)));
}
addContentNode(ngContentIndex: number, nodeExpr: o.Expression) {