Store: [Router Plugin] does not change if the navigation is on query parameters

Created on 12 May 2019  路  3Comments  路  Source: ngxs/store

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => https://github.com/ngxs/store/blob/master/CONTRIBUTING.md
[ ] Other... Please describe:

Current behavior


When I navigate with the next and previous buttons of the browser the RouterNavigation does not evolve if only the query parameters change

Ex :
First search: /todo/123/search?q=toto
-> [Router] RouterNavigation OK (with dispatch(new Navigate()))
Second research: /todo/123/search?q=titi
-> [Router] RouterNavigation OK (with dispatch(new Navigate()))
Go back: /todo/123/search?q=toto
-> no [Router] RouterNavigation :/

Expected behavior

The router plugin should detect the change and update with RouterNavigation its store

Minimal reproduction of the problem with instructions

https://stackblitz.com/edit/ngxs-simple-4w3qej

  • Step 1 : Click on Click Me
  • Step 2 : Click on Click Me
  • Step 3 : Uses the browser go back
    not easy to reproduce here because stackblitz reloads the page, but in the console the event RouterNavigation is not sent

What is the motivation / use case for changing the behavior?


馃し鈥嶁檪 Have the plugin router store with the right data

Environment


Libs:
- @angular/core version: 7.2.9
- @ngxs/store version: 7.3.0
- @ngxs/router-store version: 7.3.0

Browser:
- [x] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [x] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX

For Tooling issues:
- Node version: v11.10.1
- Platform:  Mac

Others:
N/A
plugins

Most helpful comment

Dup of #922.

All 3 comments

Dup of #922.

This should be fixed in the latest @dev version.
Please could you test it out and let us know if it fixes your problem?

Released in 3.5.0

Was this page helpful?
0 / 5 - 0 ratings