summaryrefslogtreecommitdiffstats
path: root/webapp/src/app/app-routing.module.ts
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-11-20 17:23:04 +0100
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-11-20 23:35:27 +0100
commit38c0c21a969e621c725245ce91c78e77076c5ce7 (patch)
tree0fbc61c45dc97836ca77c1426b31764a8ff158f0 /webapp/src/app/app-routing.module.ts
parentb0d130807fb9bf36f5ac1abe21cbd558eb86d5cc (diff)
New dashboard look & feel
Dashboard is a fork of ngx-admin release v2.0.1 (sha be7649a9a2da835) Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
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 {
+}