@Aexils wrote:
Hello, I do not know how to ask my question but I use
this.router.navigateByUrl('tabs/list', {state: {country: this.country}});
I get my ‘country’ variable in my ‘list’ page very well, except that when I restart a query with another value in my variable.
When I get my variable in the ‘list’ page, like that :
this.stateUrl = this.router.getCurrentNavigation().extras.state.country;
This.stateUrl always returns me the value of my first variable …
What approaches are possible?
Reload my function? How?Another way to get my variable?
Thanks !
Edit :
To put in context, I have a search bar, the user writes for example: “Paris”, then validates his search, he finds himself on the page ‘list’ with the name of several restaurants in Paris. If the user now returns to search and writes: “fksgrfs”, and validates, he will still have the results for Paris since the variable this.country does not update
Posts: 1
Participants: 1