fix: update content-projector to latest ng4

This commit is contained in:
Roman Hotsiy 2017-03-29 10:55:46 +03:00
parent 2c8b2ce326
commit d52c7ef8a0
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0

View File

@ -31,11 +31,11 @@ export class ContentProjector {
// using private property to get view instance
let viewContainer = (<any>parentView)._view;
let viewData = (<any>parentView)._data;
viewData.embeddedViews = viewData.embeddedViews || [];
viewData.viewContainer._embeddedViews = viewData.viewContainer.embeddedViews || [];
for (let i=0; i < componentRefs.length; i++) {
let compRef = componentRefs[i];
// attach view to containter change detector
viewData.embeddedViews.push((<any>compRef.hostView)._view);
viewData.viewContainer._embeddedViews.push((<any>compRef.hostView)._view);
(<any>compRef.hostView).attachToViewContainerRef(viewContainer);
}
return parentCompRef;