You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
puhui-go-web/src/app/app.routes.ts

39 lines
1.2 KiB

import { Routes } from '@angular/router';
import {IndexComponent} from "./pages/body/index/index.component";
import {InitGuardService} from "./utils/initGuard.service";
export const routes: Routes = [
{path: '', pathMatch: 'full', redirectTo: 'admin/index'},
{
path: 'login',
loadChildren: () => import('./pages/login/login.routes').then(m => m.LOGIN_ROUTES)
},
{
path: 'index',
loadChildren: () => import('./pages/login/login.routes').then(m => m.LOGIN_ROUTES)
},
{
path: 'admin', component: IndexComponent,
children: [
{
path: 'index',
loadChildren: () => import('./pages/index/index.routes').then(m => m.INDEX_ROUTES),
canActivate: [InitGuardService]
},
{
path: 'account',
loadChildren: () => import('./pages/account/account.routes').then(m => m.ACCOUNT_ROUTES),
canActivate: [InitGuardService]
},
{
path: 'goods',
loadChildren: () => import('./pages/goods/goods.routes').then(m => m.GOODS_ROUTES),
canActivate: [InitGuardService]
},
{
path: 'system',
loadChildren: () => import('./pages/system/system.routes').then(m => m.SYSTEM_ROUTES),
canActivate: [InitGuardService]
},
]
}
];