Can deactivate guard change browser url even on shouldActivate false
Closed this issue · 1 comments
@fboeller and @kelvindart-certua
I have encountered a situation where candeactivate guard changing the browser url for the next route even if shouldactivate is false.
later I check the code, can we have a fix where we can have additional check on guard here.
or any suggestion will be appreciated. Please help. I am stuck at this point.
registerOutgoingRouting(outgoingRoute$: Subject): Subscription {
return this.router.events.subscribe((event) => {
if (
event instanceof RoutesRecognized &&
(!this.isFromPlatform() || isRedirect(event))
) {
outgoingRoute$.next({
url: event.urlAfterRedirects,
replaceUrl: isRedirect(event),
});
}
});
}
Hey, sorry, I don't have the time to look into this currently. I suggest you can use registerIncomingRouting
and an own version of registerOutgoingRouting
in your entry component such that you can fix the behaviour of that method for your code. If you find a general backwards-compatible fix for the problem, I can also merge it into the library, but don't have the time at the moment to inspect the problem myself.