i want to create nested component in angular 4
this is chooser component
import {InputComponent} from './input/input.component'
import {BlockComponent} from './block/block.component'
export const FormChooser = {
Block: BlockComponent,
Input: InputComponent
}
this is component builder
const component = FormChooser[data.component]
const factory = this.Resolver.resolveComponentFactory(component)
const new_component = this.ViewContainerRef.createComponent(factory)
How to get new_component ViewContainerRef ? so i can use code like this
const another_new_component = new_component.createComponent(factory) // as ViewContainerRef
Thank you...