Angular routing with multiple routes and router-outlet

佐手、 提交于 2019-12-04 13:26:26

Do you really need a named router outlet?

<router-outlet name="users"></router-outlet>

Or could you just use a child router outlet:

<router-outlet></router-outlet>

I have a video about routing here that may help: https://www.youtube.com/watch?v=LaIAHOSKHCQ&t=1s

Yo... just specify the outlet to be a custom outlet https://angular.io/guide/router#add-a-secondary-route

so you could say

{
  path: 'compose',
  component: ComposeMessageComponent,
  outlet: 'popup'
},

Then this component will render in a <popup></popup> component

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!