add comments

This commit is contained in:
Roman Hotsiy 2016-11-02 00:19:37 +02:00
parent 4b6cc2ea79
commit fe53a3d7d0
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0

View File

@ -27,11 +27,14 @@ export class ContentProjector {
}
let parentCompRef = parentView.createComponent(componentFactory, null, contextInjector, [projectedNodes]);
// using private property to get AppElement instance
let appElement = (<any>parentView)._element;
appElement.nestedViews = appElement.nestedViews || [];
for (let i=0; i < componentRefs.length; i++) {
let compRef = componentRefs[i];
appElement.nestedViews.push((<any>compRef.hostView).internalView);
// attach appElement to parentView change detector
(<any>compRef.hostView).internalView.addToContentChildren(appElement);
}
return parentCompRef;