import {NgModule} from '@angular/core'; import {RouterModule} from '@angular/router'; import {StudentRootComponent} from './student-root.component'; import {StudentClassViewComponent} from './StudentClassView/student-class-view.component'; import {StudentCompletedViewComponent} from './StudentCompletedView/student-completed-view.component'; import {StudentSubmissionViewComponent} from './StudentSubmissionView/student-submission-view.component'; import {LoginGuardService} from 'src/app/services/login-guard.service'; const studentRoutes = [ { path: 'sdashboard', component: StudentRootComponent, canActivate: [LoginGuardService]}, { path: 'class-view', component: StudentClassViewComponent, canActivate: [LoginGuardService]}, { path: 'completed-view', component: StudentCompletedViewComponent, canActivate: [LoginGuardService]}, { path: 'submission-view', component: StudentSubmissionViewComponent, canActivate: [LoginGuardService]}, ]; @NgModule({ imports: [ RouterModule.forChild(studentRoutes) ], exports: [ RouterModule ] }) export class StudentRoutesModule { }