Access child component from dynamically created component

Discussão em 'Angular' iniciado por Sara, Novembro 20, 2024.

  1. Sara

    Sara Guest

    Inside global-component I have method for dynamically creating component

    const comFactory = this.resolver.resolveComponentFactory(ParentComponent);
    const component: any = this.componentContainer.createComponent(comFactory);


    (where componentContainer is ViewContainerRef)

    Inside my parent-component I have child-component (which has two more child components inside):

    <child-component #childCmp></child-component>


    Is there any way I can access child-component from my global component?

    Continue reading...

Compartilhe esta Página