diff --git a/src/app/header/components/search-bar/search-bar.component.ts b/src/app/header/components/search-bar/search-bar.component.ts index 352cfde..1a2c8d4 100644 --- a/src/app/header/components/search-bar/search-bar.component.ts +++ b/src/app/header/components/search-bar/search-bar.component.ts @@ -1,5 +1,6 @@ import { Component, EventEmitter, OnInit, Output } from '@angular/core'; import { Router } from '@angular/router'; +import { RestoPageComponent } from 'src/app/pages/resto-page/resto-page.component'; import { ApiBackService } from 'src/app/services/api-back.service'; @Component({ @@ -35,7 +36,8 @@ export class SearchBarComponent implements OnInit { console.log(this.restauByName); this.apiBackService.setListRestau(this.restauByName, "filtres"); + this.route.routeReuseStrategy.shouldReuseRoute= () => false; + this.route.onSameUrlNavigation = 'reload'; this.route.navigate(['restaurants']); } } -