我已经成功生成了一个单片jhipster 4.13应用程序,并将其修改为使用登录页面启动。 现在,我的所有应用程序的网址都从" http://localhost:9000/#/"到" http://localhost:9000/"。 例如,如果我调用fonctionnality然后我会:
"http://localhost:9000/user-management/(audits)" instead of "http://localhost:9000/#/audits"
因此生成页面未找到错误!
我做错了什么?我需要你的帮助,谢谢你。
以下是我app.route.ts的内容:
export const APP_ROUTE: Routes = [
{
path: '',
component: HomeLayoutComponent,
data: {
authorities: ['ROLE_USER'], // ROLE_ADMIN
pageTitle: 'home.title'
},
canActivate: [ UserRouteAccessService ],
children: [
{ path: '', component: NavbarComponent, outlet: 'navbar' },
{ path: '',
component: HomeComponent,
data: {
authorities: ['ROLE_USER'],
pageTitle: 'home.title'
},
canActivate: [UserRouteAccessService]
},
...errorRoute,
...adminState,
...accountState
]
},
{
path: '',
component: LoginLayoutComponent,
children: [
{ path: 'login', component: LoginComponent },
{ path: 'register', component: RegisterComponent },
{ path: 'reset/request', component: PasswordResetInitComponent },
{ path: 'about', component: AboutComponent }
]
},
// otherwise redirect to 404 page not found
{ path: '404', component: PageNotFoundComponent },
{ path: '**', redirectTo: '404', pathMatch: 'full' }
];
以下是app-routing.module.ts文件的内容:
const LAYOUT_ROUTES = [
navbarRoute,
...APP_ROUTE,
...errorRoute
];
@NgModule({
imports: [
RouterModule.forRoot(
LAYOUT_ROUTES,
{ useHash: true, enableTracing: true }
)
],
exports: [
RouterModule
]
})
export class AppRoutingModule {}