diff --git a/front/src/app/group-detail/group-detail.component.ts b/front/src/app/group-detail/group-detail.component.ts index 7ad401b..76867bc 100644 --- a/front/src/app/group-detail/group-detail.component.ts +++ b/front/src/app/group-detail/group-detail.component.ts @@ -10,6 +10,7 @@ import { Location } from '@angular/common'; import { fadeInAnimation } from '../_animations/index'; import { GroupService } from '../group.service'; +import { ArianeService } from '../ariane.service'; @Component({ selector: 'app-group-detail', @@ -28,7 +29,8 @@ export class GroupDetailComponent implements OnInit { constructor(private route: ActivatedRoute, private router: Router, private locate: Location, - private groupService: GroupService) { + private groupService: GroupService, + private arianeService: ArianeService) { } @@ -55,6 +57,7 @@ export class GroupDetailComponent implements OnInit { } onSelectSaison(_idSelected: number):void { this.router.navigate(['saison/' + _idSelected ]); + this.arianeService.setSaison(_idSelected); } onSelectVideo(_idSelected: number):void { diff --git a/front/src/app/home/home.component.ts b/front/src/app/home/home.component.ts index b63394c..63f6248 100644 --- a/front/src/app/home/home.component.ts +++ b/front/src/app/home/home.component.ts @@ -10,6 +10,7 @@ import { Location } from '@angular/common'; import { fadeInAnimation } from '../_animations/index'; import { TypeService } from '../type.service'; +import { ArianeService } from '../ariane.service'; @Component({ selector: 'app-home', @@ -23,7 +24,8 @@ export class HomeComponent implements OnInit { error = ""; constructor(private router: Router, private locate: Location, - private typeService: TypeService) { + private typeService: TypeService, + private arianeService: ArianeService) { } @@ -37,8 +39,10 @@ export class HomeComponent implements OnInit { self.error = "Wrong e-mail/login or password"; self.data_list = [] }); + this.arianeService.reset(); } onSelectType(_idSelected: number):void { + this.arianeService.setType(_idSelected); //this.router.navigate(['type/', { id: _idSelected} ]); this.router.navigate(['type/' + _idSelected ]); } diff --git a/front/src/app/saison-detail/saison-detail.component.ts b/front/src/app/saison-detail/saison-detail.component.ts index 0c95c41..9076836 100644 --- a/front/src/app/saison-detail/saison-detail.component.ts +++ b/front/src/app/saison-detail/saison-detail.component.ts @@ -10,6 +10,7 @@ import { Location } from '@angular/common'; import { fadeInAnimation } from '../_animations/index'; import { SaisonService } from '../saison.service'; +import { ArianeService } from '../ariane.service'; @Component({ selector: 'app-saison-detail', @@ -26,7 +27,8 @@ export class SaisonDetailComponent implements OnInit { constructor(private route: ActivatedRoute, private router: Router, private locate: Location, - private saisonService: SaisonService) { + private saisonService: SaisonService, + private arianeService: ArianeService) { } diff --git a/front/src/app/top-menu/top-menu.component.html b/front/src/app/top-menu/top-menu.component.html index b2b259c..1c64e4c 100644 --- a/front/src/app/top-menu/top-menu.component.html +++ b/front/src/app/top-menu/top-menu.component.html @@ -4,6 +4,15 @@ (click)="onHome()"> home Home +