The issue is caused by package @ngxs/store and @ngxs/router-plugin
No
Navigating from route with query parameters to one without them causes an infinite redirect in Angular 8 but not Angular 7 with both NGXS 3.4.3 and 3.5.1
Initial route: localhost:4200?dialedNumber=5555555
Action handler:
@Action(RouterNavigation)
handleQueryParams(
{ dispatch }: StateContext<HomeStateModel>,
{ routerState }: RouterNavigation,
) {
const queryParams = routerState.root.queryParams;
const { dialedNumber } = queryParams;
if (dialedNumber) {
return dispatch(
new Navigate([routerState.url.split('?')[0]]),
);
}
}
Go ahead and close this issue if you need me to set up a stackblitz. I realized I don't technically need this in my app, so take this issue or leave it. If somebody else has this issue, feel free to give your own stackblitz they can use, or copy this issue text and create your own.
Throttling navigation to prevent the browser from hanging. See https://crbug.com/882238. Command line switch --disable-ipc-flooding-protection can be used to bypass the protection
Libs:
- @angular/core version: 8.2.10 (issue doesn't exist in 7.2.0)
- @ngxs/store version: 3.5.1 and 3.4.3
Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
For Tooling issues:
- Node version: XX
- Platform:
Others:
@mfp22 Thanks for the reproduction! That has been really helpful to debug this.
We were able to use that to reproduce in a test.
Guys, what about status of this issue?
Try @dev version
Most helpful comment
@mfp22 Thanks for the reproduction! That has been really helpful to debug this.
We were able to use that to reproduce in a test.