From 62e62f118d5da57acd3494fece2e8ed357564ffe Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 9 May 2018 09:26:41 +0200 Subject: [PATCH] Load my-account module lazily --- client/src/app/{my-account => +my-account}/index.ts | 0 .../my-account-routing.module.ts | 8 ++++---- .../my-account-change-password/index.ts | 0 .../my-account-change-password.component.html | 0 .../my-account-change-password.component.scss | 0 .../my-account-change-password.component.ts | 0 .../my-account-settings/my-account-profile/index.ts | 0 .../my-account-profile/my-account-profile.component.html | 0 .../my-account-profile/my-account-profile.component.scss | 0 .../my-account-profile/my-account-profile.component.ts | 0 .../my-account-settings.component.html | 0 .../my-account-settings.component.scss | 0 .../my-account-settings/my-account-settings.component.ts | 0 .../my-account-video-settings/index.ts | 0 .../my-account-video-settings.component.html | 0 .../my-account-video-settings.component.scss | 0 .../my-account-video-settings.component.ts | 0 .../my-account-video-channel-create.component.ts | 0 .../my-account-video-channel-edit.component.html | 0 .../my-account-video-channel-edit.component.scss | 0 .../my-account-video-channel-edit.ts | 0 .../my-account-video-channel-update.component.ts | 0 .../my-account-video-channels.component.html | 0 .../my-account-video-channels.component.scss | 0 .../my-account-video-channels.component.ts | 0 .../my-account-videos/my-account-videos.component.html | 0 .../my-account-videos/my-account-videos.component.scss | 0 .../my-account-videos/my-account-videos.component.ts | 0 .../{my-account => +my-account}/my-account.component.html | 0 .../{my-account => +my-account}/my-account.component.ts | 0 .../app/{my-account => +my-account}/my-account.module.ts | 8 ++++---- client/src/app/app-routing.module.ts | 4 ++++ client/src/app/app.module.ts | 3 --- 33 files changed, 12 insertions(+), 11 deletions(-) rename client/src/app/{my-account => +my-account}/index.ts (100%) rename client/src/app/{my-account => +my-account}/my-account-routing.module.ts (79%) rename client/src/app/{my-account => +my-account}/my-account-settings/my-account-change-password/index.ts (100%) rename client/src/app/{my-account => +my-account}/my-account-settings/my-account-change-password/my-account-change-password.component.html (100%) rename client/src/app/{my-account => +my-account}/my-account-settings/my-account-change-password/my-account-change-password.component.scss (100%) rename client/src/app/{my-account => +my-account}/my-account-settings/my-account-change-password/my-account-change-password.component.ts (100%) rename client/src/app/{my-account => +my-account}/my-account-settings/my-account-profile/index.ts (100%) rename client/src/app/{my-account => +my-account}/my-account-settings/my-account-profile/my-account-profile.component.html (100%) rename client/src/app/{my-account => +my-account}/my-account-settings/my-account-profile/my-account-profile.component.scss (100%) rename client/src/app/{my-account => +my-account}/my-account-settings/my-account-profile/my-account-profile.component.ts (100%) rename client/src/app/{my-account => +my-account}/my-account-settings/my-account-settings.component.html (100%) rename client/src/app/{my-account => +my-account}/my-account-settings/my-account-settings.component.scss (100%) rename client/src/app/{my-account => +my-account}/my-account-settings/my-account-settings.component.ts (100%) rename client/src/app/{my-account => +my-account}/my-account-settings/my-account-video-settings/index.ts (100%) rename client/src/app/{my-account => +my-account}/my-account-settings/my-account-video-settings/my-account-video-settings.component.html (100%) rename client/src/app/{my-account => +my-account}/my-account-settings/my-account-video-settings/my-account-video-settings.component.scss (100%) rename client/src/app/{my-account => +my-account}/my-account-settings/my-account-video-settings/my-account-video-settings.component.ts (100%) rename client/src/app/{my-account => +my-account}/my-account-video-channels/my-account-video-channel-create.component.ts (100%) rename client/src/app/{my-account => +my-account}/my-account-video-channels/my-account-video-channel-edit.component.html (100%) rename client/src/app/{my-account => +my-account}/my-account-video-channels/my-account-video-channel-edit.component.scss (100%) rename client/src/app/{my-account => +my-account}/my-account-video-channels/my-account-video-channel-edit.ts (100%) rename client/src/app/{my-account => +my-account}/my-account-video-channels/my-account-video-channel-update.component.ts (100%) rename client/src/app/{my-account => +my-account}/my-account-video-channels/my-account-video-channels.component.html (100%) rename client/src/app/{my-account => +my-account}/my-account-video-channels/my-account-video-channels.component.scss (100%) rename client/src/app/{my-account => +my-account}/my-account-video-channels/my-account-video-channels.component.ts (100%) rename client/src/app/{my-account => +my-account}/my-account-videos/my-account-videos.component.html (100%) rename client/src/app/{my-account => +my-account}/my-account-videos/my-account-videos.component.scss (100%) rename client/src/app/{my-account => +my-account}/my-account-videos/my-account-videos.component.ts (100%) rename client/src/app/{my-account => +my-account}/my-account.component.html (100%) rename client/src/app/{my-account => +my-account}/my-account.component.ts (100%) rename client/src/app/{my-account => +my-account}/my-account.module.ts (68%) diff --git a/client/src/app/my-account/index.ts b/client/src/app/+my-account/index.ts similarity index 100% rename from client/src/app/my-account/index.ts rename to client/src/app/+my-account/index.ts diff --git a/client/src/app/my-account/my-account-routing.module.ts b/client/src/app/+my-account/my-account-routing.module.ts similarity index 79% rename from client/src/app/my-account/my-account-routing.module.ts rename to client/src/app/+my-account/my-account-routing.module.ts index 96f52c1da..7e19cd994 100644 --- a/client/src/app/my-account/my-account-routing.module.ts +++ b/client/src/app/+my-account/my-account-routing.module.ts @@ -5,13 +5,13 @@ import { LoginGuard } from '../core' 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' -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' +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' const myAccountRoutes: Routes = [ { - path: 'my-account', + path: '', component: MyAccountComponent, canActivateChild: [ MetaGuard, LoginGuard ], children: [ diff --git a/client/src/app/my-account/my-account-settings/my-account-change-password/index.ts b/client/src/app/+my-account/my-account-settings/my-account-change-password/index.ts similarity index 100% rename from client/src/app/my-account/my-account-settings/my-account-change-password/index.ts rename to client/src/app/+my-account/my-account-settings/my-account-change-password/index.ts diff --git a/client/src/app/my-account/my-account-settings/my-account-change-password/my-account-change-password.component.html b/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.html similarity index 100% rename from client/src/app/my-account/my-account-settings/my-account-change-password/my-account-change-password.component.html rename to client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.html diff --git a/client/src/app/my-account/my-account-settings/my-account-change-password/my-account-change-password.component.scss b/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.scss similarity index 100% rename from client/src/app/my-account/my-account-settings/my-account-change-password/my-account-change-password.component.scss rename to client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.scss diff --git a/client/src/app/my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts b/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts similarity index 100% rename from client/src/app/my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts rename to client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts diff --git a/client/src/app/my-account/my-account-settings/my-account-profile/index.ts b/client/src/app/+my-account/my-account-settings/my-account-profile/index.ts similarity index 100% rename from client/src/app/my-account/my-account-settings/my-account-profile/index.ts rename to client/src/app/+my-account/my-account-settings/my-account-profile/index.ts diff --git a/client/src/app/my-account/my-account-settings/my-account-profile/my-account-profile.component.html b/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.html similarity index 100% rename from client/src/app/my-account/my-account-settings/my-account-profile/my-account-profile.component.html rename to client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.html diff --git a/client/src/app/my-account/my-account-settings/my-account-profile/my-account-profile.component.scss b/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.scss similarity index 100% rename from client/src/app/my-account/my-account-settings/my-account-profile/my-account-profile.component.scss rename to client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.scss diff --git a/client/src/app/my-account/my-account-settings/my-account-profile/my-account-profile.component.ts b/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts similarity index 100% rename from client/src/app/my-account/my-account-settings/my-account-profile/my-account-profile.component.ts rename to client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.ts diff --git a/client/src/app/my-account/my-account-settings/my-account-settings.component.html b/client/src/app/+my-account/my-account-settings/my-account-settings.component.html similarity index 100% rename from client/src/app/my-account/my-account-settings/my-account-settings.component.html rename to client/src/app/+my-account/my-account-settings/my-account-settings.component.html diff --git a/client/src/app/my-account/my-account-settings/my-account-settings.component.scss b/client/src/app/+my-account/my-account-settings/my-account-settings.component.scss similarity index 100% rename from client/src/app/my-account/my-account-settings/my-account-settings.component.scss rename to client/src/app/+my-account/my-account-settings/my-account-settings.component.scss diff --git a/client/src/app/my-account/my-account-settings/my-account-settings.component.ts b/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts similarity index 100% rename from client/src/app/my-account/my-account-settings/my-account-settings.component.ts rename to client/src/app/+my-account/my-account-settings/my-account-settings.component.ts diff --git a/client/src/app/my-account/my-account-settings/my-account-video-settings/index.ts b/client/src/app/+my-account/my-account-settings/my-account-video-settings/index.ts similarity index 100% rename from client/src/app/my-account/my-account-settings/my-account-video-settings/index.ts rename to client/src/app/+my-account/my-account-settings/my-account-video-settings/index.ts diff --git a/client/src/app/my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.html b/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.html similarity index 100% rename from client/src/app/my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.html rename to client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.html diff --git a/client/src/app/my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.scss b/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.scss similarity index 100% rename from client/src/app/my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.scss rename to client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.scss diff --git a/client/src/app/my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.ts b/client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.ts similarity index 100% rename from client/src/app/my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.ts rename to client/src/app/+my-account/my-account-settings/my-account-video-settings/my-account-video-settings.component.ts diff --git a/client/src/app/my-account/my-account-video-channels/my-account-video-channel-create.component.ts b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-create.component.ts similarity index 100% rename from client/src/app/my-account/my-account-video-channels/my-account-video-channel-create.component.ts rename to client/src/app/+my-account/my-account-video-channels/my-account-video-channel-create.component.ts diff --git a/client/src/app/my-account/my-account-video-channels/my-account-video-channel-edit.component.html b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-edit.component.html similarity index 100% rename from client/src/app/my-account/my-account-video-channels/my-account-video-channel-edit.component.html rename to client/src/app/+my-account/my-account-video-channels/my-account-video-channel-edit.component.html diff --git a/client/src/app/my-account/my-account-video-channels/my-account-video-channel-edit.component.scss b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-edit.component.scss similarity index 100% rename from client/src/app/my-account/my-account-video-channels/my-account-video-channel-edit.component.scss rename to client/src/app/+my-account/my-account-video-channels/my-account-video-channel-edit.component.scss diff --git a/client/src/app/my-account/my-account-video-channels/my-account-video-channel-edit.ts b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-edit.ts similarity index 100% rename from client/src/app/my-account/my-account-video-channels/my-account-video-channel-edit.ts rename to client/src/app/+my-account/my-account-video-channels/my-account-video-channel-edit.ts diff --git a/client/src/app/my-account/my-account-video-channels/my-account-video-channel-update.component.ts b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-update.component.ts similarity index 100% rename from client/src/app/my-account/my-account-video-channels/my-account-video-channel-update.component.ts rename to client/src/app/+my-account/my-account-video-channels/my-account-video-channel-update.component.ts diff --git a/client/src/app/my-account/my-account-video-channels/my-account-video-channels.component.html b/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.html similarity index 100% rename from client/src/app/my-account/my-account-video-channels/my-account-video-channels.component.html rename to client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.html diff --git a/client/src/app/my-account/my-account-video-channels/my-account-video-channels.component.scss b/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.scss similarity index 100% rename from client/src/app/my-account/my-account-video-channels/my-account-video-channels.component.scss rename to client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.scss diff --git a/client/src/app/my-account/my-account-video-channels/my-account-video-channels.component.ts b/client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.ts similarity index 100% rename from client/src/app/my-account/my-account-video-channels/my-account-video-channels.component.ts rename to client/src/app/+my-account/my-account-video-channels/my-account-video-channels.component.ts diff --git a/client/src/app/my-account/my-account-videos/my-account-videos.component.html b/client/src/app/+my-account/my-account-videos/my-account-videos.component.html similarity index 100% rename from client/src/app/my-account/my-account-videos/my-account-videos.component.html rename to client/src/app/+my-account/my-account-videos/my-account-videos.component.html diff --git a/client/src/app/my-account/my-account-videos/my-account-videos.component.scss b/client/src/app/+my-account/my-account-videos/my-account-videos.component.scss similarity index 100% rename from client/src/app/my-account/my-account-videos/my-account-videos.component.scss rename to client/src/app/+my-account/my-account-videos/my-account-videos.component.scss diff --git a/client/src/app/my-account/my-account-videos/my-account-videos.component.ts b/client/src/app/+my-account/my-account-videos/my-account-videos.component.ts similarity index 100% rename from client/src/app/my-account/my-account-videos/my-account-videos.component.ts rename to client/src/app/+my-account/my-account-videos/my-account-videos.component.ts diff --git a/client/src/app/my-account/my-account.component.html b/client/src/app/+my-account/my-account.component.html similarity index 100% rename from client/src/app/my-account/my-account.component.html rename to client/src/app/+my-account/my-account.component.html diff --git a/client/src/app/my-account/my-account.component.ts b/client/src/app/+my-account/my-account.component.ts similarity index 100% rename from client/src/app/my-account/my-account.component.ts rename to client/src/app/+my-account/my-account.component.ts diff --git a/client/src/app/my-account/my-account.module.ts b/client/src/app/+my-account/my-account.module.ts similarity index 68% rename from client/src/app/my-account/my-account.module.ts rename to client/src/app/+my-account/my-account.module.ts index ba9dea71e..7e6b8c03e 100644 --- a/client/src/app/my-account/my-account.module.ts +++ b/client/src/app/+my-account/my-account.module.ts @@ -6,10 +6,10 @@ import { MyAccountVideoSettingsComponent } from './my-account-settings/my-accoun import { MyAccountSettingsComponent } from './my-account-settings/my-account-settings.component' import { MyAccountComponent } from './my-account.component' import { MyAccountVideosComponent } from './my-account-videos/my-account-videos.component' -import { MyAccountProfileComponent } from '@app/my-account/my-account-settings/my-account-profile/my-account-profile.component' -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' +import { MyAccountProfileComponent } from '@app/+my-account/my-account-settings/my-account-profile/my-account-profile.component' +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' @NgModule({ imports: [ diff --git a/client/src/app/app-routing.module.ts b/client/src/app/app-routing.module.ts index 799748cfa..936912d28 100644 --- a/client/src/app/app-routing.module.ts +++ b/client/src/app/app-routing.module.ts @@ -8,6 +8,10 @@ const routes: Routes = [ path: 'admin', loadChildren: './+admin/admin.module#AdminModule' }, + { + path: 'my-account', + loadChildren: './+my-account/my-account.module#MyAccountModule' + }, { path: 'accounts', loadChildren: './+accounts/accounts.module#AccountsModule' diff --git a/client/src/app/app.module.ts b/client/src/app/app.module.ts index c22632fb8..f0d2be279 100644 --- a/client/src/app/app.module.ts +++ b/client/src/app/app.module.ts @@ -6,8 +6,6 @@ import { ResetPasswordModule } from '@app/reset-password' import { MetaLoader, MetaModule, MetaStaticLoader, PageTitlePositioning } from '@ngx-meta/core' -import { MyAccountModule } from './my-account' - import { AppRoutingModule } from './app-routing.module' import { AppComponent } from './app.component' import { CoreModule } from './core' @@ -46,7 +44,6 @@ export function metaFactory (serverService: ServerService): MetaLoader { AppRoutingModule, - MyAccountModule, CoreModule, LoginModule, ResetPasswordModule, -- 2.25.1