且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Angular 2 Uncaught(承诺):错误:无法匹配任何路线.URL段:'aboutme'错误:无法匹配任何路由.网址段:aboutme

更新时间:2021-07-25 17:16:34

您的路径应定义为 aboutme

Your path should be defined as just aboutme,

const appRouting: Routes = [
  { path: '', redirectTo: 'aboutme', pathMatch: 'full'},
  { path: 'aboutme', component: AboutmeComponent},
  { path: 'component/dev-angularjs', component: DevAngularjsComponent}
];