diff --git a/src/app/app.routes.ts b/src/app/app.routes.ts index a0740e36e66451466d7e04f30433e2058902301c..35d3f1ae7520d4c77163ef8e360d572a10825571 100644 --- a/src/app/app.routes.ts +++ b/src/app/app.routes.ts @@ -6,7 +6,7 @@ import { QuizComponent } from './views/quiz/quiz.component'; export const routes: Routes = [ { - path: 'quiz', + path: '', title: "Quiz Inclusif, le jeu", children: [ { path: '', redirectTo: 'accueil', pathMatch: 'full' }, @@ -16,5 +16,5 @@ export const routes: Routes = [ { path: '**', component: QuizComponent }, ], }, - { path: '', redirectTo: 'quiz/accueil', pathMatch: 'full' }, + { path: '', redirectTo: 'accueil', pathMatch: 'full' }, ]; diff --git a/src/app/shared/services/progress-service.ts b/src/app/shared/services/progress-service.ts index 6e4a5d308add2aac1a87a2c7ddddc7722a497fa0..5608ecb840ce3b85f41820f8d3d3476ae4d498f4 100644 --- a/src/app/shared/services/progress-service.ts +++ b/src/app/shared/services/progress-service.ts @@ -39,7 +39,7 @@ export class ProgressService { goToEnd() { /* Envoie sur la page de fin */ this.hasEnded.set(true); - this.router.navigate(["quiz", "fin"], { replaceUrl: true }); + this.router.navigate(["", "fin"], { replaceUrl: true }); } goToNext() { @@ -48,7 +48,7 @@ export class ProgressService { this.dataService.getNewQuestion(); this.questionNumber.update(n => n + 1); this.answered.set(false); - this.router.navigate(["quiz", this.questionNumber().toString()], { + this.router.navigate(["", this.questionNumber().toString()], { queryParams: { theme: this.dataService.currentTopic(), theme_id: this.dataService.currentQuestionId(), repondu: "faux" }, replaceUrl: this.questionNumber() > 0, }); diff --git a/src/app/views/quiz/quiz-endpage/quiz-endpage.component.ts b/src/app/views/quiz/quiz-endpage/quiz-endpage.component.ts index d87ae03576e2b81e9b3d0941f3699f40e0aa7656..4d846549c4351db50f885138b5796d67701f6cea 100644 --- a/src/app/views/quiz/quiz-endpage/quiz-endpage.component.ts +++ b/src/app/views/quiz/quiz-endpage/quiz-endpage.component.ts @@ -24,6 +24,6 @@ export class QuizEndpageComponent { } GotoQuiz(){ - this.router.navigate(['/quiz/accueil']) + this.router.navigate(['/accueil']) } } diff --git a/src/app/views/quiz/quiz-homepage/quiz-homepage.component.ts b/src/app/views/quiz/quiz-homepage/quiz-homepage.component.ts index 8657bc4537ceebb5b4842ddc6729bf6cbd075bf9..38dfa064cdc99abb435d2759c6f949b2912bcecc 100644 --- a/src/app/views/quiz/quiz-homepage/quiz-homepage.component.ts +++ b/src/app/views/quiz/quiz-homepage/quiz-homepage.component.ts @@ -23,7 +23,7 @@ export class QuizHomepageComponent { constructor(private router:Router) {} commencer(){ - this.router.navigate(['/quiz/temps']) + this.router.navigate(['/temps']) } - + }