I have one component(container) and 3 nested child components live inside that. Let us take it as First component. Also I have another component, Let us take is as Second component which is not related to the first component. I need to move all view elements (nested components) from first component into the second component dynamically.
Asked
Active
Viewed 82 times
1
-
After a google search, you could do it this [way](https://stackoverflow.com/questions/45069815/moving-a-component-to-another-parent-component-in-angular), by using [viewContainerRef](https://angular.io/api/core/ViewContainerRef). – roger May 18 '18 at 11:44
-
i saw it, but i'm using lazy loading component, and can't get entryComponent, in NgModule – Forg May 18 '18 at 12:06
-
this information about Lazy loading may help someone who wants to help, so they can give you an alternative solution. Otherwise You may see people pop in with answers you had try, it takes you further from your answer. :) – roger May 19 '18 at 12:51