Skip to content

Commit 5817fbf

Browse files
authored
chore: ng v8 new loadChildren import syntax (#93)
1 parent 4971cb9 commit 5817fbf

File tree

15 files changed

+24
-24
lines changed

15 files changed

+24
-24
lines changed

packages/template-blank-ng/src/app/app-routing.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { NativeScriptRouterModule } from "nativescript-angular/router";
44

55
const routes: Routes = [
66
{ path: "", redirectTo: "/home", pathMatch: "full" },
7-
{ path: "home", loadChildren: "~/app/home/home.module#HomeModule" }
7+
{ path: "home", loadChildren: () => import(`~/app/home/home.module`).then((m) => m.HomeModule) }
88
];
99

1010
@NgModule({

packages/template-blank-ng/tsconfig.tns.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
"module": "esNext",
55
"moduleResolution": "node"
66
}
7-
}
7+
}

packages/template-drawer-navigation-ng/src/app/app-routing.module.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ import { NativeScriptRouterModule } from "nativescript-angular/router";
44

55
const routes: Routes = [
66
{ path: "", redirectTo: "/home", pathMatch: "full" },
7-
{ path: "home", loadChildren: "~/app/home/home.module#HomeModule" },
8-
{ path: "browse", loadChildren: "~/app/browse/browse.module#BrowseModule" },
9-
{ path: "search", loadChildren: "~/app/search/search.module#SearchModule" },
10-
{ path: "featured", loadChildren: "~/app/featured/featured.module#FeaturedModule" },
11-
{ path: "settings", loadChildren: "~/app/settings/settings.module#SettingsModule" }
7+
{ path: "home", loadChildren: () => import(`~/app/home/home.module`).then(m => m.HomeModule) },
8+
{ path: "browse", loadChildren: () => import(`~/app/browse/browse.module`).then(m => m.BrowseModule) },
9+
{ path: "search", loadChildren: () => import(`~/app/search/search.module`).then(m => m.SearchModule) },
10+
{ path: "featured", loadChildren: () => import(`~/app/featured/featured.module`).then(m => m.FeaturedModule) },
11+
{ path: "settings", loadChildren: () => import(`~/app/settings/settings.module`).then(m => m.SettingsModule) }
1212
];
1313

1414
@NgModule({

packages/template-drawer-navigation-ng/tsconfig.tns.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
"module": "esNext",
55
"moduleResolution": "node"
66
}
7-
}
7+
}

packages/template-health-survey-ng/src/app/app-routing.module.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import { LoggedInLazyLoadGuard } from "./logged-in-lazy-load.guard";
66

77
const routes: Routes = [
88
{ path: "", redirectTo: "/consent", pathMatch: "full" },
9-
{ path: "login", loadChildren: "~/app/login/login.module#LoginModule" },
10-
{ path: "consent", loadChildren: "~/app/consent/consent.module#ConsentModule", canLoad: [LoggedInLazyLoadGuard] },
11-
{ path: "survey", loadChildren: "~/app/survey/survey.module#SurveyModule" }
9+
{ path: "login", loadChildren: () => import(`~/app/login/login.module`).then((m) => m.LoginModule) },
10+
{ path: "consent", loadChildren: () => import(`~/app/consent/consent.module`).then((m) => m.ConsentModule), canLoad: [LoggedInLazyLoadGuard] },
11+
{ path: "survey", loadChildren: () => import(`~/app/survey/survey.module`).then((m) => m.SurveyModule) }
1212
];
1313

1414
@NgModule({

packages/template-health-survey-ng/tsconfig.tns.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
"module": "esNext",
55
"moduleResolution": "node"
66
}
7-
}
7+
}

packages/template-hello-world-ng/tsconfig.tns.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
"module": "esNext",
55
"moduleResolution": "node"
66
}
7-
}
7+
}

packages/template-master-detail-kinvey-ng/src/app/app-routing.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { NativeScriptRouterModule } from "nativescript-angular/router";
44

55
const routes: Routes = [
66
{ path: "", redirectTo: "/cars", pathMatch: "full" },
7-
{ path: "cars", loadChildren: "~/app/cars/cars.module#CarsModule" }
7+
{ path: "cars", loadChildren: () => import(`~/app/cars/cars.module`).then((m) => m.CarsModule) }
88
];
99

1010
@NgModule({

packages/template-master-detail-kinvey-ng/tsconfig.tns.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
"module": "esNext",
55
"moduleResolution": "node"
66
}
7-
}
7+
}

packages/template-master-detail-ng/src/app/app-routing.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { NativeScriptRouterModule } from "nativescript-angular/router";
44

55
const routes: Routes = [
66
{ path: "", redirectTo: "/cars", pathMatch: "full" },
7-
{ path: "cars", loadChildren: "~/app/cars/cars.module#CarsModule" }
7+
{ path: "cars", loadChildren: () => import(`~/app/cars/cars.module`).then((m) => m.CarsModule) }
88
];
99

1010
@NgModule({

packages/template-master-detail-ng/tsconfig.tns.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
"module": "esNext",
55
"moduleResolution": "node"
66
}
7-
}
7+
}

packages/template-patient-care-ng/src/app-routing.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import { LoggedInLazyLoadGuard } from "./logged-in-lazy-load.guard";
66

77
const routes: Routes = [
88
{ path: "", redirectTo: "/care", pathMatch: "full" },
9-
{ path: "care", loadChildren: "./care/care.module#CareModule", canLoad: [LoggedInLazyLoadGuard] },
10-
{ path: "login", loadChildren: "./login/login.module#LoginModule" }
9+
{ path: "care", loadChildren: () => import(`./care/care.module`).then((m) => m.CareModule), canLoad: [LoggedInLazyLoadGuard] },
10+
{ path: "login", loadChildren: () => import(`./login/login.module`).then((m) => m.LoginModule) }
1111
];
1212

1313
@NgModule({

packages/template-patient-care-ng/tsconfig.tns.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
"module": "esNext",
55
"moduleResolution": "node"
66
}
7-
}
7+
}

packages/template-tab-navigation-ng/src/app/app-routing.module.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ const routes: Routes = [
1313
{
1414
path: "home",
1515
component: NSEmptyOutletComponent,
16-
loadChildren: "~/app/home/home.module#HomeModule",
16+
loadChildren: () => import(`~/app/home/home.module`).then((m) => m.HomeModule),
1717
outlet: "homeTab"
1818
},
1919
{
2020
path: "browse",
2121
component: NSEmptyOutletComponent,
22-
loadChildren: "~/app/browse/browse.module#BrowseModule",
22+
loadChildren: () => import(`~/app/browse/browse.module`).then((m) => m.BrowseModule),
2323
outlet: "browseTab"
2424
},
2525
{
2626
path: "search",
2727
component: NSEmptyOutletComponent,
28-
loadChildren: "~/app/search/search.module#SearchModule",
28+
loadChildren: () => import(`~/app/search/search.module`).then((m) => m.SearchModule),
2929
outlet: "searchTab"
3030
}
3131
];

packages/template-tab-navigation-ng/tsconfig.tns.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
"module": "esNext",
55
"moduleResolution": "node"
66
}
7-
}
7+
}

0 commit comments

Comments
 (0)