Angular-6无法识别基于命名路由器出口的路由

时间:2018-10-01 10:02:11

标签: angular-ui-router angular6

我已经在Angular-6应用中配置了路由。尝试使用基于named router-outlets的路由。 我似乎已经按照规定/需要完成了所有工作,但是我仍然收到以下错误

 ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'setuporg'
 Error: Cannot match any routes. URL Segment: 'setuporg'
at ApplyRedirects.noMatchError (router.js:1382)
at CatchSubscriber.eval [as selector] (router.js:1363)

路由一致性:

 const appRoutes: Routes = [
 {
path:'login',
component: IdeComponent,
children:[
            {
                  path: 'setuporg',
                  component: SetupOrgComponent,
                  outlet: 'wrkspace'
   }] 
  }

ide.component.html

<button mat-raised-button [routerLink]="[{outlets:{wrkspace:['setuporg']}} ]" routerLinkActive="active">Org</button>
 . . . .
  <router-outlet name="wrkspace"></router-outlet>

我基本上是想通过单击上述'SetupOrgComponent'来在名为wrkspace的路由器出口中渲染组件"Org"-button

请让我知道我是否缺少任何东西。

0 个答案:

没有答案