Prerequisites
Ionic Framework Version
v8.x
Current Behavior
The ion-router-outlet shows the wrong page after a vue-router navigation guard was used.
Given:
ion-page Home
ion-page Register
ion-page Profile
When:
A user registers using the following flow: Home -> Register -> Profile.
The transition from Home -> Register uses router.push.
The transition from Register -> Profile uses router.replace.
Being on the Profile page, back navigation is prevented using a navigation guard (see example).
Then:
After a logout (Profile -> Home), it's not possible to log in again (Home -> Profile) because the ion-router-outlet shows the wrong page although the path was changed to /profile.
Expected Behavior
The correct ion-page should be displayed after a navigation guard prevented the user from going back.

The Profile page should be displayed.
Steps to Reproduce
- go to Home page
- click on "REGISTER"
- click on "SIGN UP"
- try to go one step back in history, e.g. by using the back button on the mouse
- see that the page does not change [EXPECTED]
- click on "LOGOUT"
- click on "LOGIN"
- see that page does not change [BUG]
Code Reproduction URL
https://stackblitz.com/edit/vitejs-vite-vphseq?file=README.md
Ionic Info
Ionic:
Ionic CLI : 7.2.0
Ionic Framework : @ionic/vue 8.2.5
Capacitor:
Capacitor CLI : 6.1.0
@capacitor/android : 6.1.1
@capacitor/core : 6.1.0
@capacitor/ios : 6.1.1
Utility:
cordova-res : not installed globally
native-run : 2.0.1
System:
NodeJS : v20.12.0
npm : 10.8.1
OS : macOS Unknown
Additional Information
No response
Prerequisites
Ionic Framework Version
v8.x
Current Behavior
The
ion-router-outletshows the wrong page after avue-routernavigation guard was used.Given:
ion-pageHomeion-pageRegisterion-pageProfileWhen:
A user registers using the following flow:
Home->Register->Profile.The transition from
Home->Registerusesrouter.push.The transition from
Register->Profileusesrouter.replace.Being on the
Profilepage, back navigation is prevented using a navigation guard (see example).Then:
After a logout (
Profile->Home), it's not possible to log in again (Home->Profile) because theion-router-outletshows the wrong page although the path was changed to/profile.Expected Behavior
The correct

ion-pageshould be displayed after a navigation guard prevented the user from going back.The
Profilepage should be displayed.Steps to Reproduce
Code Reproduction URL
https://stackblitz.com/edit/vitejs-vite-vphseq?file=README.md
Ionic Info
Ionic:
Ionic CLI : 7.2.0
Ionic Framework : @ionic/vue 8.2.5
Capacitor:
Capacitor CLI : 6.1.0
@capacitor/android : 6.1.1
@capacitor/core : 6.1.0
@capacitor/ios : 6.1.1
Utility:
cordova-res : not installed globally
native-run : 2.0.1
System:
NodeJS : v20.12.0
npm : 10.8.1
OS : macOS Unknown
Additional Information
No response