1 | import { NgModule } from '@angular/core';
|
---|
2 | import { RouterModule, Routes } from '@angular/router';
|
---|
3 | import {LoginComponent} from "./login/login.component";
|
---|
4 | import {StudentCourseComponent} from "./student-course/student-course.component";
|
---|
5 | import {QuestionComponent} from "./question/question.component";
|
---|
6 | import {QuestionDetailsComponent} from "./question-details/question-details.component";
|
---|
7 | import {SubjectComponent} from "./subject/subject.component";
|
---|
8 | import {AddQuestionComponent} from "./add-question/add-question.component";
|
---|
9 | import {AddAnswerComponent} from "./add-answer/add-answer.component";
|
---|
10 | import {AdminPanelComponent} from "./admin-panel/admin-panel.component";
|
---|
11 | import {MaterialsComponent} from "./materials/materials.component";
|
---|
12 | import {AddMaterialComponent} from "./add-material/add-material.component";
|
---|
13 |
|
---|
14 |
|
---|
15 | const routes: Routes = [
|
---|
16 | { path: '', redirectTo: '/login', pathMatch: 'full' },
|
---|
17 | { path: 'login', component: LoginComponent },
|
---|
18 | { path: 'courses', component: StudentCourseComponent },
|
---|
19 | { path: 'allCourses', component: SubjectComponent },
|
---|
20 | { path: 'admin-panel', component: AdminPanelComponent},
|
---|
21 | { path: 'add-question/:id', component: AddQuestionComponent},
|
---|
22 | { path: 'add-answer/:id', component:AddAnswerComponent},
|
---|
23 | { path: 'details/:id', component: QuestionComponent },
|
---|
24 | { path: 'question-details/:id', component: QuestionDetailsComponent},
|
---|
25 | { path: 'materials/:id', component: MaterialsComponent},
|
---|
26 | { path: 'add-materials', component: AddMaterialComponent}
|
---|
27 | ];
|
---|
28 |
|
---|
29 | @NgModule({
|
---|
30 | imports: [RouterModule.forRoot(routes)],
|
---|
31 | exports: [RouterModule]
|
---|
32 | })
|
---|
33 | export class AppRoutingModule {
|
---|
34 |
|
---|
35 | }
|
---|