2016-12-14 01:44:52 +00:00
|
|
|
/**
|
|
|
|
|
* @license
|
2020-05-19 19:08:49 +00:00
|
|
|
* Copyright Google LLC All Rights Reserved.
|
2016-12-14 01:44:52 +00:00
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
|
|
|
* found in the LICENSE file at https://angular.io/license
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
import {Component, NgModule} from '@angular/core';
|
2016-12-14 01:35:06 +00:00
|
|
|
import {RouterModule} from '@angular/router';
|
|
|
|
|
|
2016-12-14 01:44:52 +00:00
|
|
|
@Component({selector: 'lazy-comp', template: 'lazy!'})
|
|
|
|
|
export class LazyComponent {
|
|
|
|
|
}
|
2016-12-14 01:35:06 +00:00
|
|
|
|
|
|
|
|
@NgModule({
|
2017-06-20 18:24:26 +00:00
|
|
|
imports: [[RouterModule.forChild([
|
2021-09-25 20:33:57 +00:00
|
|
|
{path: '', component: LazyComponent, pathMatch: 'full'}, {
|
|
|
|
|
path: 'feature',
|
|
|
|
|
loadChildren: () => import('./feature/feature.module').then(mod => mod.FeatureModule)
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: 'lazy-feature',
|
|
|
|
|
loadChildren: () => import('./feature/lazy-feature.module').then(mod => mod.LazyFeatureModule)
|
|
|
|
|
}
|
2017-06-20 18:24:26 +00:00
|
|
|
])]],
|
2016-12-14 01:35:06 +00:00
|
|
|
declarations: [LazyComponent]
|
|
|
|
|
})
|
|
|
|
|
export class LazyModule {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export class SecondModule {}
|