X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=src%2Fxds%2Fxds-agent.git;a=blobdiff_plain;f=webapp%2Fsrc%2Fapp%2Fapp-routing.module.ts;h=5490a21cf926040dbe8f825bc2e67a287fea48bd;hp=36629de289e471d7a8e79aa4cca1c759fe1723d2;hb=38c0c21a969e621c725245ce91c78e77076c5ce7;hpb=b0d130807fb9bf36f5ac1abe21cbd558eb86d5cc diff --git a/webapp/src/app/app-routing.module.ts b/webapp/src/app/app-routing.module.ts index 36629de..5490a21 100644 --- a/webapp/src/app/app-routing.module.ts +++ b/webapp/src/app/app-routing.module.ts @@ -1,18 +1,57 @@ +import { ExtraOptions, RouterModule, Routes } from '@angular/router'; import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; -import { HomeComponent } from './home/home.component'; -import { ConfigComponent } from './config/config.component'; -import { DevelComponent } from './devel/devel.component'; +import { + NbAuthComponent, + NbLoginComponent, + NbLogoutComponent, + NbRegisterComponent, + NbRequestPasswordComponent, + NbResetPasswordComponent, +} from '@nebular/auth'; const routes: Routes = [ - { path: 'config', component: ConfigComponent, data: { title: 'Config' } }, - { path: 'home', component: HomeComponent, data: { title: 'Home' } }, - { path: 'devel', component: DevelComponent, data: { title: 'Build & Deploy' } }, - { path: '**', component: HomeComponent } + { path: 'pages', loadChildren: 'app/pages/pages.module#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: 'pages', pathMatch: 'full' }, + { path: '**', redirectTo: 'pages' }, ]; +const config: ExtraOptions = { + useHash: true, +}; + @NgModule({ - imports: [RouterModule.forRoot(routes)], - exports: [RouterModule] + imports: [RouterModule.forRoot(routes, config)], + exports: [RouterModule], }) -export class AppRoutingModule { } +export class AppRoutingModule { +}