2017-06-16 07:32:15 -05:00
|
|
|
import { NgModule } from '@angular/core'
|
|
|
|
import { RouterModule, Routes } from '@angular/router'
|
2017-07-06 10:43:58 -05:00
|
|
|
import { MetaGuard } from '@ngx-meta/core'
|
2017-10-10 03:18:25 -05:00
|
|
|
import { LoginGuard } from '../core'
|
2018-04-23 09:16:05 -05: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'
|
2018-05-09 02:26:41 -05:00
|
|
|
import { MyAccountVideoChannelsComponent } from '@app/+my-account/my-account-video-channels/my-account-video-channels.component'
|
|
|
|
import { MyAccountVideoChannelCreateComponent } from '@app/+my-account/my-account-video-channels/my-account-video-channel-create.component'
|
|
|
|
import { MyAccountVideoChannelUpdateComponent } from '@app/+my-account/my-account-video-channels/my-account-video-channel-update.component'
|
2016-11-20 10:18:15 -06:00
|
|
|
|
2018-04-23 09:16:05 -05:00
|
|
|
const myAccountRoutes: Routes = [
|
2016-11-20 10:18:15 -06:00
|
|
|
{
|
2018-05-09 02:26:41 -05:00
|
|
|
path: '',
|
2018-04-23 09:16:05 -05:00
|
|
|
component: MyAccountComponent,
|
2017-12-01 10:38:26 -06:00
|
|
|
canActivateChild: [ MetaGuard, LoginGuard ],
|
|
|
|
children: [
|
2018-06-07 10:05:57 -05:00
|
|
|
{
|
|
|
|
path: '',
|
|
|
|
redirectTo: 'settings',
|
|
|
|
pathMatch: 'full'
|
|
|
|
},
|
2017-12-01 10:38:26 -06:00
|
|
|
{
|
|
|
|
path: 'settings',
|
2018-04-23 09:16:05 -05:00
|
|
|
component: MyAccountSettingsComponent,
|
2017-12-01 10:38:26 -06:00
|
|
|
data: {
|
|
|
|
meta: {
|
|
|
|
title: 'Account settings'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2018-04-26 09:11:38 -05:00
|
|
|
{
|
|
|
|
path: 'video-channels',
|
|
|
|
component: MyAccountVideoChannelsComponent,
|
|
|
|
data: {
|
|
|
|
meta: {
|
|
|
|
title: 'Account video channels'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'video-channels/create',
|
|
|
|
component: MyAccountVideoChannelCreateComponent,
|
|
|
|
data: {
|
|
|
|
meta: {
|
|
|
|
title: 'Create new video channel'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'video-channels/update/:videoChannelId',
|
|
|
|
component: MyAccountVideoChannelUpdateComponent,
|
|
|
|
data: {
|
|
|
|
meta: {
|
|
|
|
title: 'Update video channel'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2017-12-01 11:56:26 -06:00
|
|
|
{
|
|
|
|
path: 'videos',
|
2018-04-23 09:16:05 -05:00
|
|
|
component: MyAccountVideosComponent,
|
2017-12-01 11:56:26 -06:00
|
|
|
data: {
|
|
|
|
meta: {
|
|
|
|
title: 'Account videos'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-12-01 10:38:26 -06:00
|
|
|
]
|
2016-11-20 10:18:15 -06:00
|
|
|
}
|
2017-06-16 07:32:15 -05:00
|
|
|
]
|
2016-11-20 10:18:15 -06:00
|
|
|
|
|
|
|
@NgModule({
|
2018-04-23 09:16:05 -05:00
|
|
|
imports: [ RouterModule.forChild(myAccountRoutes) ],
|
2016-11-20 10:18:15 -06:00
|
|
|
exports: [ RouterModule ]
|
|
|
|
})
|
2018-04-23 09:16:05 -05:00
|
|
|
export class MyAccountRoutingModule {}
|