2017-06-16 12:32:15 +00:00
|
|
|
import { NgModule } from '@angular/core'
|
|
|
|
import { RouterModule, Routes } from '@angular/router'
|
2017-07-06 15:43:58 +00:00
|
|
|
import { MetaGuard } from '@ngx-meta/core'
|
2017-10-10 08:18:25 +00:00
|
|
|
import { LoginGuard } from '../core'
|
2018-04-23 14:16:05 +00:00
|
|
|
import { MyAccountComponent } from './my-account.component'
|
|
|
|
import { MyAccountSettingsComponent } from './my-account-settings/my-account-settings.component'
|
|
|
|
import { MyAccountVideosComponent } from './my-account-videos/my-account-videos.component'
|
2016-11-20 16:18:15 +00:00
|
|
|
|
2018-04-23 14:16:05 +00:00
|
|
|
const myAccountRoutes: Routes = [
|
2016-11-20 16:18:15 +00:00
|
|
|
{
|
2018-04-23 14:16:05 +00:00
|
|
|
path: 'my-account',
|
|
|
|
component: MyAccountComponent,
|
2017-12-01 16:38:26 +00:00
|
|
|
canActivateChild: [ MetaGuard, LoginGuard ],
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: 'settings',
|
2018-04-23 14:16:05 +00:00
|
|
|
component: MyAccountSettingsComponent,
|
2017-12-01 16:38:26 +00:00
|
|
|
data: {
|
|
|
|
meta: {
|
|
|
|
title: 'Account settings'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2017-12-01 17:56:26 +00:00
|
|
|
{
|
|
|
|
path: 'videos',
|
2018-04-23 14:16:05 +00:00
|
|
|
component: MyAccountVideosComponent,
|
2017-12-01 17:56:26 +00:00
|
|
|
data: {
|
|
|
|
meta: {
|
|
|
|
title: 'Account videos'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-12-01 16:38:26 +00:00
|
|
|
]
|
2016-11-20 16:18:15 +00:00
|
|
|
}
|
2017-06-16 12:32:15 +00:00
|
|
|
]
|
2016-11-20 16:18:15 +00:00
|
|
|
|
|
|
|
@NgModule({
|
2018-04-23 14:16:05 +00:00
|
|
|
imports: [ RouterModule.forChild(myAccountRoutes) ],
|
2016-11-20 16:18:15 +00:00
|
|
|
exports: [ RouterModule ]
|
|
|
|
})
|
2018-04-23 14:16:05 +00:00
|
|
|
export class MyAccountRoutingModule {}
|