2017-04-13 14:24:23 +03:00
|
|
|
import { ExtraOptions, RouterModule, Routes } from '@angular/router';
|
|
|
|
|
import { NgModule } from '@angular/core';
|
2017-08-02 17:27:19 +03:00
|
|
|
import {
|
2017-08-02 18:13:50 +03:00
|
|
|
NbAuthComponent,
|
|
|
|
|
NbLoginComponent,
|
|
|
|
|
NbLogoutComponent,
|
|
|
|
|
NbRegisterComponent,
|
|
|
|
|
NbRequestPasswordComponent,
|
|
|
|
|
NbResetPasswordComponent,
|
|
|
|
|
} from '@nebular/auth';
|
2017-04-13 14:24:23 +03:00
|
|
|
|
|
|
|
|
const routes: Routes = [
|
2017-04-21 17:23:44 +03:00
|
|
|
{ path: 'pages', loadChildren: 'app/pages/pages.module#PagesModule' },
|
2017-08-02 17:27:19 +03:00
|
|
|
{
|
|
|
|
|
path: 'auth',
|
2017-08-02 18:13:50 +03:00
|
|
|
component: NbAuthComponent,
|
2017-08-02 17:27:19 +03:00
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
path: '',
|
2017-08-02 18:13:50 +03:00
|
|
|
component: NbLoginComponent,
|
2017-08-02 17:27:19 +03:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'login',
|
2017-08-02 18:13:50 +03:00
|
|
|
component: NbLoginComponent,
|
2017-08-02 17:27:19 +03:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'register',
|
2017-08-02 18:13:50 +03:00
|
|
|
component: NbRegisterComponent,
|
2017-08-02 17:27:19 +03:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'logout',
|
2017-08-02 18:13:50 +03:00
|
|
|
component: NbLogoutComponent,
|
2017-08-02 17:27:19 +03:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'request-password',
|
2017-08-02 18:13:50 +03:00
|
|
|
component: NbRequestPasswordComponent,
|
2017-08-02 17:27:19 +03:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'reset-password',
|
2017-08-02 18:13:50 +03:00
|
|
|
component: NbResetPasswordComponent,
|
2017-08-02 17:27:19 +03:00
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
2017-04-21 17:23:44 +03:00
|
|
|
{ path: '', redirectTo: 'pages', pathMatch: 'full' },
|
|
|
|
|
{ path: '**', redirectTo: 'pages' },
|
2017-04-13 14:24:23 +03:00
|
|
|
];
|
|
|
|
|
|
|
|
|
|
const config: ExtraOptions = {
|
2017-04-21 17:23:44 +03:00
|
|
|
useHash: true,
|
2017-04-13 14:24:23 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
@NgModule({
|
|
|
|
|
imports: [RouterModule.forRoot(routes, config)],
|
2017-04-21 17:23:44 +03:00
|
|
|
exports: [RouterModule],
|
2017-04-13 14:24:23 +03:00
|
|
|
})
|
|
|
|
|
export class AppRoutingModule {
|
|
|
|
|
}
|