1- import { NgModule } from '@angular/core' ;
21import { Routes } from '@angular/router' ;
3- import { NativeScriptRouterModule } from '@nativescript/angular' ;
4-
52import { ItemDetailComponent } from './item/item-detail.component' ;
63import { ItemsComponent } from './item/items.component' ;
74// import { HomeComponent } from './home/home.component';
85// import { BootGuardService } from './boot-guard.service';
96
10- const routes : Routes = [
7+ export const routes : Routes = [
118 { path : '' , redirectTo : '/rootlazy' , pathMatch : 'full' } ,
129 { path : 'items' , component : ItemsComponent } ,
1310 { path : 'item/:id' , component : ItemDetailComponent } ,
14- { path : 'item2' , loadChildren : ( ) => import ( './item2/item2.module ' ) . then ( ( m ) => m . Item2Module ) } ,
11+ { path : 'item2' , loadChildren : ( ) => import ( './item2/item2.routes ' ) . then ( ( m ) => m . ITEM2_ROUTES ) } ,
1512 { path : 'rootlazy' , loadChildren : ( ) => import ( './item3/item3.module' ) . then ( ( m ) => m . Item3Module ) } ,
1613
1714 /**
@@ -36,9 +33,3 @@ const routes: Routes = [
3633 // loadChildren: () => import('./item2/item2.module').then((m) => m.Item2Module),
3734 // },
3835] ;
39-
40- @NgModule ( {
41- imports : [ NativeScriptRouterModule . forRoot ( routes ) ] ,
42- exports : [ NativeScriptRouterModule ] ,
43- } )
44- export class AppRoutingModule { }
0 commit comments