考核考试系统
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.

36 lines
1.2 KiB

import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { LoginComponent } from './pages/login/login.component';
import { NavigationComponent } from './navigation/navigation.component';
import { LockscreenComponent } from './pages/lockscreen/lockscreen.component';
//路由守卫
import {AuthGuard} from './auth.guard'
import { CreateTestScoreComponent } from './examiner/create-test-score/create-test-score.component';
import { ExaminerIndexComponent } from './examiner/examiner-index/examiner-index.component'
const routes: Routes = [
{path:'',redirectTo:'login',pathMatch:'full'},
{
path:'examiner',
component:NavigationComponent,
canActivate: [AuthGuard],//守卫验证
children:[
{path:'',loadChildren:() => import('./examiner/examiner.module').then(m => m.ExaminerModule)}
]
},
{ path:'adminLogin', component:LoginComponent}, //管理员登录路由
{ path:'login', component:LockscreenComponent}, //教员学员登录路由
{ path:'examiner/create-test-score', component:CreateTestScoreComponent}, //创建试卷具体分数页面
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }