1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

How to dynamically add a child component in the parent component

Discussão em 'Angular' iniciado por user6781, Maio 23, 2025.

  1. user6781

    user6781 Guest

    I have a child and a parent component as following:

    <app-parent>
    <app-child> </app-child>
    </app-parent>


    How can I dynamically increase the number of children shown in the parent component? Something like I click on a button in the parent component and then a new child be added, like below:

    <app-parent>
    <app-child> </app-child>
    <app-child> </app-child>
    </app-parent>

    Continue reading...

Compartilhe esta Página