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.
|
|
|
import { NgModule } from '@angular/core';
|
|
|
|
import { Routes, RouterModule } from '@angular/router';
|
|
|
|
import { LoginComponent } from './pages/login/login.component';
|
|
|
|
import { RegisterComponent } from './pages/register/register.component';
|
|
|
|
|
|
|
|
//路由守卫
|
|
|
|
import { AuthGuard } from './auth.guard'
|
|
|
|
import { HomeComponent } from './pages/home/home.component';
|
|
|
|
import { NavigationComponent } from './system-management/navigation/navigation.component';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const routes: Routes = [
|
|
|
|
{ path: '', redirectTo: 'login', pathMatch: 'full' },
|
|
|
|
{ path: 'login', component: LoginComponent }, //登录页
|
|
|
|
{ path: 'register', component: RegisterComponent }, //注册页
|
|
|
|
{
|
|
|
|
path: '', component: HomeComponent, children: [
|
|
|
|
{ path: '', loadChildren: () => import('./pages/pages.module').then(m => m.PagesModule) }
|
|
|
|
]
|
|
|
|
}, //首页
|
|
|
|
{
|
|
|
|
path: '', component: NavigationComponent, children: [
|
|
|
|
{ path: 'system', loadChildren: () => import('./system-management/system-management.module').then(m => m.SystemManagementModule) }
|
|
|
|
]
|
|
|
|
}//系统管理
|
|
|
|
];
|
|
|
|
|
|
|
|
@NgModule({
|
|
|
|
imports: [RouterModule.forRoot(routes)],
|
|
|
|
exports: [RouterModule]
|
|
|
|
})
|
|
|
|
export class AppRoutingModule { }
|