ngxs / store

🚀 NGXS - State Management for Angular
http://ngxs.io
MIT License
3.54k stars 406 forks source link

🐞[BUG]: Regression - Router plugin behavior change in 3.7.0 #1718

Closed catchshyam closed 1 year ago

catchshyam commented 3 years ago

Affected Package

@ngxs/router-plugin

Is this a regression?

Yes

Description

The target URL and params are not reflected in the RouterState.state during routing (for example when accessed in the route guards and resolvers)

🔬 Minimal Reproduction

Angular 8 with ngxs store and router plugin 3.3.1 https://stackblitz.com/edit/angular8-ngxs-issue-1605

Angular 10 with ngxs store and router plugin 3.7.0 https://stackblitz.com/edit/angular10-ngxs-issue-1605

On the /home route, click on "details" link.

And on the details page, you will see the detected URL. With angular 8, the url is "details" while aith angular 10, it is displayed as home.

Environment


Libs:
- @angular/core version: 10.2.1
- @ngxs/store version: 3.7.0

Browser:
- [x ] Chrome (desktop) version 86.0.4240.198
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [x ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ x] Edge version XX            
markwhitfeld commented 1 year ago

Great news! v3.8.0 has been released and it includes a fix for this issue. We are closing this issue, but please re-open it if the issue is not resolved. Please leave a comment in the v3.8.0 release discussion if you come across any regressions with respect to your issue.