File size: 2,410 Bytes
38fa174 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
import { bootstrapApplication } from '@angular/platform-browser';
import { provideHttpClient } from '@angular/common/http';
import { provideRouter, Routes } from '@angular/router';
import { FormsModule } from '@angular/forms';
import { importProvidersFrom } from '@angular/core';
import { MatchingListComponent } from './app/matching-list/matching-list.component';
import { UserPreferencesComponent } from './app/user-preferences/user-preferences.component';
import { AppComponent } from './app/app.component';
import { IntroPageComponent } from './app/intro-page/intro-page.component';
import { QuestionAnswerComponent } from './app/question-answer/question-answer.component';
import { LlmQuizComponent } from './app/llm-quiz/llm-quiz.component';
import { AuthGuard } from './app/services/auth.guard';
import { QuestionAnswerService } from './app/question-answer/question-answer-service.service';
import { provideAnimations } from '@angular/platform-browser/animations';
const routes: Routes = [
{
path: 'auth',
children: [
{
path: 'signin',
loadComponent: () =>
import('./app/auth/sign-in/sign-in.component').then(m => m.SignInComponent),
},
{
path: 'signup',
loadComponent: () =>
import('./app/auth/sign-up/sign-up.component').then(m => m.SignUpComponent),
},
],
},
{ path: '', component: IntroPageComponent, pathMatch: 'full' },
{ path: 'sign-in', redirectTo: 'auth/signin', pathMatch: 'full' },
{ path: 'sign-up', redirectTo: 'auth/signup', pathMatch: 'full' },
{
path: 'question-answer',
component: QuestionAnswerComponent,
canActivate: [AuthGuard]
},
{
path: 'llmquiz',
component: LlmQuizComponent,
canActivate: [AuthGuard]
},
{
path: 'matchinglist',
component: MatchingListComponent,
canActivate: [AuthGuard]
},
{
path: 'userpreferences',
component: UserPreferencesComponent,
canActivate: [AuthGuard]
},
{
path: 'matchinglist/:id',
component: MatchingListComponent,
canActivate: [AuthGuard]
},
{ path: '**', redirectTo: '' }
];
bootstrapApplication(AppComponent, {
providers: [
provideHttpClient(),
provideRouter(routes),
importProvidersFrom(FormsModule),
QuestionAnswerService,
provideAnimations(),
AuthGuard
]
});
|