Angular, named outlet need to add slash to path

111 Views Asked by At

I have layout named admin-panel

<app-top-panel></app-top-panel>
<app-side-bar-n></app-side-bar-n>
<div id="content" class="content">
  <router-outlet></router-outlet>
  <router-outlet name="moneyComingModal"></router-outlet>
</div>

when I call the named outlet from any component for example overview.component like this:

    <a [routerLink]="[ { outlets: { moneyComingModal:addMoneyComingModal } }] ">
      test
    </a>

its work's good, but when I call this outlet from the sidebar component the link loose slash '/'

link is: overview(moneyComingModal:addMoneyComingModal)

how I can add the slash after overview path? code from sidebar:

 <a [routerLink]="['', { outlets: { moneyComingModal:'addMoneyComingModal' } }] ">
   test
 </a>

output: ---> overview(moneyComingModal:addMoneyComingModal)

What I need:

overview/(moneyComingModal:addMoneyComingModal)
0

There are 0 best solutions below