From 0626e7af82e02f8a5bd1e74a7d4d8c916d073ceb Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 24 Apr 2018 15:10:54 +0200 Subject: Add account view --- client/src/app/+account/account-routing.module.ts | 45 +++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 client/src/app/+account/account-routing.module.ts (limited to 'client/src/app/+account/account-routing.module.ts') diff --git a/client/src/app/+account/account-routing.module.ts b/client/src/app/+account/account-routing.module.ts new file mode 100644 index 000000000..534102121 --- /dev/null +++ b/client/src/app/+account/account-routing.module.ts @@ -0,0 +1,45 @@ +import { NgModule } from '@angular/core' +import { RouterModule, Routes } from '@angular/router' +import { MetaGuard } from '@ngx-meta/core' +import { AccountComponent } from './account.component' +import { AccountVideosComponent } from './account-videos/account-videos.component' +import { AccountAboutComponent } from '@app/+account/account-about/account-about.component' + +const accountRoutes: Routes = [ + { + path: ':accountId', + component: AccountComponent, + canActivateChild: [ MetaGuard ], + children: [ + { + path: '', + redirectTo: 'videos', + pathMatch: 'full' + }, + { + path: 'videos', + component: AccountVideosComponent, + data: { + meta: { + title: 'Account videos' + } + } + }, + { + path: 'about', + component: AccountAboutComponent, + data: { + meta: { + title: 'About account' + } + } + } + ] + } +] + +@NgModule({ + imports: [ RouterModule.forChild(accountRoutes) ], + exports: [ RouterModule ] +}) +export class AccountRoutingModule {} -- cgit v1.2.3