1234567891011121314151617181920212223242526272829 |
- import { NgModule } from '@angular/core';
- import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
- const routes: Routes = [
- {
- path: '',
- loadChildren: () => import('./tabs/tabs.module').then(m => m.TabsPageModule)
- },
- {
- path: 'detail',
- loadChildren: () => import('./detail-page/detail-page.module').then( m => m.DetailPagePageModule)
- },
- {
- path: 'login',
- loadChildren: () => import('./login/login.module').then(m => m.LoginPageModule)
- },
- // 添加:
- {
- path: 'user',
- loadChildren: () => import('../modules/user/user.module').then(m => m.UserModule)
- }
- ];
- @NgModule({
- imports: [
- RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })
- ],
- exports: [RouterModule]
- })
- export class AppRoutingModule {}
|