beforeRouteUpdate not fired when indirectly loading same route?

I’m not sure what should be the expected behavior with beforeRouteUpdate.

It does get called if I add a router-link to my component with the same route and changed parameters.

However, if I go to my route, then back to homepage, then back to my route with changed parameters, it’s not called.

My assumption would be that it would get called so I can rerender my component, since a cached component is loaded with data related to the previous parameters.

Figured I can use ionViewWillEnter instead of beforeRouteUpdate for my use case.

Still unsure is the beforeRouteUpdate thing a bug or not.

This should be fixed in Ionic Vue v5.6.15: fix(vue): router guards are now fired correctly when written in a com… · ionic-team/ionic-framework@3c44222 · GitHub

1 Like