angular-cn/modules/@angular/compiler-cli/integrationtest/ngtools_src/feature/lazy-feature.module.ts

21 lines
497 B
TypeScript
Raw Normal View History

import {NgModule, Component} from '@angular/core';
import {RouterModule} from '@angular/router';
@Component({
selector: 'lazy-feature-comp',
template: 'lazy feature!'
})
export class LazyFeatureComponent {}
@NgModule({
imports: [
RouterModule.forChild([
{path: '', component: LazyFeatureComponent, pathMatch: 'full'},
{path: 'feature', loadChildren: './feature.module#FeatureModule'}
])
],
declarations: [LazyFeatureComponent]
})
export class LazyFeatureModule {
}