Load my-account module lazily
This commit is contained in:
parent
1952a538ba
commit
62e62f118d
|
@ -5,13 +5,13 @@ import { LoginGuard } from '../core'
|
||||||
import { MyAccountComponent } from './my-account.component'
|
import { MyAccountComponent } from './my-account.component'
|
||||||
import { MyAccountSettingsComponent } from './my-account-settings/my-account-settings.component'
|
import { MyAccountSettingsComponent } from './my-account-settings/my-account-settings.component'
|
||||||
import { MyAccountVideosComponent } from './my-account-videos/my-account-videos.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 { 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 { 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 { MyAccountVideoChannelUpdateComponent } from '@app/+my-account/my-account-video-channels/my-account-video-channel-update.component'
|
||||||
|
|
||||||
const myAccountRoutes: Routes = [
|
const myAccountRoutes: Routes = [
|
||||||
{
|
{
|
||||||
path: 'my-account',
|
path: '',
|
||||||
component: MyAccountComponent,
|
component: MyAccountComponent,
|
||||||
canActivateChild: [ MetaGuard, LoginGuard ],
|
canActivateChild: [ MetaGuard, LoginGuard ],
|
||||||
children: [
|
children: [
|
|
@ -6,10 +6,10 @@ import { MyAccountVideoSettingsComponent } from './my-account-settings/my-accoun
|
||||||
import { MyAccountSettingsComponent } from './my-account-settings/my-account-settings.component'
|
import { MyAccountSettingsComponent } from './my-account-settings/my-account-settings.component'
|
||||||
import { MyAccountComponent } from './my-account.component'
|
import { MyAccountComponent } from './my-account.component'
|
||||||
import { MyAccountVideosComponent } from './my-account-videos/my-account-videos.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 { 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 { 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 { 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 { MyAccountVideoChannelUpdateComponent } from '@app/+my-account/my-account-video-channels/my-account-video-channel-update.component'
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
|
@ -8,6 +8,10 @@ const routes: Routes = [
|
||||||
path: 'admin',
|
path: 'admin',
|
||||||
loadChildren: './+admin/admin.module#AdminModule'
|
loadChildren: './+admin/admin.module#AdminModule'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'my-account',
|
||||||
|
loadChildren: './+my-account/my-account.module#MyAccountModule'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: 'accounts',
|
path: 'accounts',
|
||||||
loadChildren: './+accounts/accounts.module#AccountsModule'
|
loadChildren: './+accounts/accounts.module#AccountsModule'
|
||||||
|
|
|
@ -6,8 +6,6 @@ import { ResetPasswordModule } from '@app/reset-password'
|
||||||
|
|
||||||
import { MetaLoader, MetaModule, MetaStaticLoader, PageTitlePositioning } from '@ngx-meta/core'
|
import { MetaLoader, MetaModule, MetaStaticLoader, PageTitlePositioning } from '@ngx-meta/core'
|
||||||
|
|
||||||
import { MyAccountModule } from './my-account'
|
|
||||||
|
|
||||||
import { AppRoutingModule } from './app-routing.module'
|
import { AppRoutingModule } from './app-routing.module'
|
||||||
import { AppComponent } from './app.component'
|
import { AppComponent } from './app.component'
|
||||||
import { CoreModule } from './core'
|
import { CoreModule } from './core'
|
||||||
|
@ -46,7 +44,6 @@ export function metaFactory (serverService: ServerService): MetaLoader {
|
||||||
|
|
||||||
AppRoutingModule,
|
AppRoutingModule,
|
||||||
|
|
||||||
MyAccountModule,
|
|
||||||
CoreModule,
|
CoreModule,
|
||||||
LoginModule,
|
LoginModule,
|
||||||
ResetPasswordModule,
|
ResetPasswordModule,
|
||||||
|
|
Loading…
Reference in New Issue