aboutsummaryrefslogtreecommitdiffstats
path: root/webapp/src/app/app-routing.module.ts
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/src/app/app-routing.module.ts')
-rw-r--r--webapp/src/app/app-routing.module.ts61
1 files changed, 50 insertions, 11 deletions
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 {
+}