35 lines
839 B
TypeScript
Executable File
35 lines
839 B
TypeScript
Executable File
import { NgModule } from '@angular/core';
|
|
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
|
|
|
|
const routes: Routes = [
|
|
{
|
|
path: 'home',
|
|
loadChildren: () => import('./home/home.module').then( m => m.HomePageModule)
|
|
},
|
|
{
|
|
path: '',
|
|
redirectTo: 'home',
|
|
pathMatch: 'full'
|
|
},
|
|
{
|
|
path: 'main',
|
|
loadChildren: () => import('./pages/main/main.module').then( m => m.MainPageModule)
|
|
},
|
|
{
|
|
path: 'form',
|
|
loadChildren: () => import('./pages/form/form.module').then( m => m.FormPageModule)
|
|
},
|
|
{
|
|
path: 'list',
|
|
loadChildren: () => import('./pages/list/list.module').then( m => m.ListPageModule)
|
|
},
|
|
];
|
|
|
|
@NgModule({
|
|
imports: [
|
|
RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })
|
|
],
|
|
exports: [RouterModule]
|
|
})
|
|
export class AppRoutingModule { }
|