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 {
|
|
|
|
|
NgaAuthComponent,
|
|
|
|
|
NgaLoginComponent,
|
|
|
|
|
NgaLogoutComponent,
|
|
|
|
|
NgaRegisterComponent,
|
|
|
|
|
NgaRequestPasswordComponent,
|
|
|
|
|
NgaResetPasswordComponent
|
|
|
|
|
} from '@akveo/nga-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',
|
|
|
|
|
component: NgaAuthComponent,
|
|
|
|
|
children: [
|
|
|
|
|
{
|
|
|
|
|
path: '',
|
|
|
|
|
component: NgaLoginComponent,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'login',
|
|
|
|
|
component: NgaLoginComponent,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'register',
|
|
|
|
|
component: NgaRegisterComponent,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'logout',
|
|
|
|
|
component: NgaLogoutComponent,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'request-password',
|
|
|
|
|
component: NgaRequestPasswordComponent,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'reset-password',
|
|
|
|
|
component: NgaResetPasswordComponent,
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
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 {
|
|
|
|
|
}
|