mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
20 lines
497 B
TypeScript
20 lines
497 B
TypeScript
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 {
|
|
}
|