From 4d92ddb960e2e95dbf98ce3b1ac0bd5e8f1c5e09 Mon Sep 17 00:00:00 2001 From: Thomas Cardon Date: Fri, 25 Feb 2022 16:43:31 +0100 Subject: [PATCH] search-bar = ok --- src/app/header/components/search-bar/search-bar.component.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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']); } } -