diff --git a/lib/services/content-projector.service.ts b/lib/services/content-projector.service.ts index 6e5eebad..327e8aa6 100644 --- a/lib/services/content-projector.service.ts +++ b/lib/services/content-projector.service.ts @@ -31,11 +31,11 @@ export class ContentProjector { // using private property to get view instance let viewContainer = (parentView)._view; let viewData = (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((compRef.hostView)._view); + viewData.viewContainer._embeddedViews.push((compRef.hostView)._view); (compRef.hostView).attachToViewContainerRef(viewContainer); } return parentCompRef;