-
-
Notifications
You must be signed in to change notification settings - Fork 241
/
Copy pathlazy.module.ts
38 lines (34 loc) · 969 Bytes
/
lazy.module.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core";
import { Route } from "@angular/router";
import { NativeScriptCommonModule } from "nativescript-angular/common";
import { NativeScriptRouterModule } from "nativescript-angular/router";
import { LazyComponent } from "./lazy.component";
import { LazyComponentlessRouteComponent } from "./lazy-componentless-route.component";
const routes: Route[] = [
{
path: "home",
component: LazyComponent
},
{
path: "nest",
children: [
{
path: "more",
component: LazyComponentlessRouteComponent
}
]
}
];
@NgModule({
schemas: [NO_ERRORS_SCHEMA],
imports: [
NativeScriptCommonModule,
NativeScriptRouterModule,
NativeScriptRouterModule.forChild(routes)
],
declarations: [
LazyComponent,
LazyComponentlessRouteComponent
]
})
export class LazyModule { }