0

我尝试将 NbLoginComponent 包含到我的 ngx-admin 项目中。当我尝试导航到 pages/auth/login、auth/login 或 /login throw page not found.Here is app-routing.module.ts。

    {
    path: '',
    loadChildren: () => import('./pages/pages.module')
      .then(m => m.PagesModule),
  },
  {
    path: 'auth',
    component: NbAuthComponent,
    children: [
      {
        path: '',
        component: NbLoginComponent,
      },
      {
        path: 'login',
        component: NbLoginComponent,
      },
      {
        path: 'register',
        component: NbRegisterComponent,
      },
      {
        path: 'logout',
        component: NbLogoutComponent,
      },
      {
        path: 'request-password',
        component: NbRequestPasswordComponent,
      },
      {
        path: 'reset-password',
        component: NbResetPasswordComponent,
      },
    ],
  },
  { path: '', redirectTo: 'auth', pathMatch: 'full' },
  { path: '**', redirectTo: 'pages' },
];
4

1 回答 1

0

http://localhost:4200/auth/login应该可以工作。实际上..我以同样的方式使用它

于 2020-04-21T13:52:20.057 回答