Skip to content

Commit 5b0fa75

Browse files
clydindgp1130
authored andcommitted
test: remove last string-form loadChildren usage
One E2E test was still using the deprecated string-form of the routing `loadChildren` property. The `loadChildren` usage has now been converted to use the suppported dynamic import form. The string-form has been removed from Angular v13.
1 parent 3e4ab49 commit 5b0fa75

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed
Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
1-
import {NgModule, Component} from '@angular/core';
2-
import {RouterModule} from '@angular/router';
1+
import { NgModule, Component } from '@angular/core';
2+
import { RouterModule } from '@angular/router';
33

44
@Component({
55
selector: 'lazy-feature-comp',
6-
template: 'lazy feature!'
6+
template: 'lazy feature!',
77
})
88
export class LazyFeatureComponent {}
99

1010
@NgModule({
1111
imports: [
1212
RouterModule.forChild([
13-
{path: '', component: LazyFeatureComponent, pathMatch: 'full'},
14-
{path: 'feature', loadChildren: './feature.module#FeatureModule'}
15-
])
13+
{ path: '', component: LazyFeatureComponent, pathMatch: 'full' },
14+
{
15+
path: 'feature',
16+
loadChildren: () => import('./feature.module').then((m) => m.FeatureModule),
17+
},
18+
]),
1619
],
17-
declarations: [LazyFeatureComponent]
20+
declarations: [LazyFeatureComponent],
1821
})
1922
export class LazyFeatureModule {}

0 commit comments

Comments
 (0)