首页 > 解决方案 > 角度嵌套导航和路由器插座

问题描述

我不知道如何解决嵌套角度导航的问题。我的应用程序看起来像: 在此处输入图像描述

现在我有router-outlet渲染页面的主要页面 - Page1、Page2 和 Page3,这是标准和简单的。在 Page2Component 中,我有第二个<router-outlet>对“Section A”和“Section B”routerLink 动作做出反应。

在 SectionB 组件中,我有“转到结果”按钮,我想要实现的是呈现另一个组件 - 第二个路由器出口中的结果组件 - url 必须相应更改https://somepage.com/page2/section-b/results 这是否可能?那是我缺少的部分。请在此处查看我的堆栈闪电战: https ://stackblitz.com/edit/angular-router-basic-example-stobmt ?file=app/app.routing.module.ts

标签: angularnavigationangular-routingrouter-outlet

解决方案


推荐阅读