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

Angular - Project content from child component to parent component

Discussão em 'Angular' iniciado por Mic Van, Junho 10, 2025.

  1. Mic Van

    Mic Van Guest

    I know I can use <ng-content> to project/transclude content from parent to child component but I want the opposite:

    I have a main component with a kind of statusbar on top of it and I use routing (<router-outlet>) to display the current page.

    I want each page to be able to define elements into the statusbar of the main component.

    Here's a partial answer about it: https://stackoverflow.com/a/53209994/11008903 but it does'nt work, even if I directly include my child component without routing (<my-child-component> instead of <router-outlet>). I can't find any way to do it.

    I join an illustration of what I'm trying to do.

    Thanks

    Continue reading...

Compartilhe esta Página