| 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 | |
| ] | |
| }); | |