Proper way to push()/redirect to another page?

Im trying to redirect from a blank page to a tabs component when logging, but the IonToolbar from the blank page gets stucked in the tabs component when using ’ this.$router.push() ’ to redirect to the Tabs component, so i have to use window.location.reload() so IonToolbar doesnt get stuck, but I’ve read is not a well way to use location.reload() on a Ionic app.

Anyone knows how to properly redirect from component to component route without getting sub-components stuck?, Thanks.

Using this.$router.push and this.$router.replace are correct. My guess is that you do not have an IonPage. Ionic needs that so transitions happen correctly. If you don’t have it, weird things happen. Every screen/page that has a route, needs to be wrapped in IonPage. More info here.

1 Like