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 { 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';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const routes: Routes = [
|
|
|
|
{path:'',redirectTo:'login',pathMatch:'full'},
|
|
|
|
{
|
|
|
|
path:'home',
|
|
|
|
component:NavigationComponent,
|
|
|
|
canActivate: [AuthGuard],//守卫验证
|
|
|
|
children:[
|
|
|
|
{path:'',loadChildren:() => import('./ui/ui.module').then(m => m.UiModule)}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{ 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 { }
|