Load my-account module lazily

pull/559/head
Chocobozzz 2018-05-09 09:26:41 +02:00
parent 1952a538ba
commit 62e62f118d
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
33 changed files with 12 additions and 11 deletions

View File

@ -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: [

View File

@ -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: [

View File

@ -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'

View File

@ -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,