mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-15 09:34:19 +08:00
feat(vue): add hardware back button hook (#22069)
This commit is contained in:
@ -1,9 +1,7 @@
|
||||
import { App } from 'vue';
|
||||
import {
|
||||
createRouter as createVueRouter,
|
||||
createWebHistory as createVueWebHistory,
|
||||
NavigationGuardNext,
|
||||
RouteLocationNormalized
|
||||
createWebHistory as createVueWebHistory
|
||||
} from 'vue-router';
|
||||
import { createIonRouter } from './router';
|
||||
import { createViewStacks } from './viewStacks';
|
||||
@ -25,11 +23,6 @@ export const createRouter = (opts: IonicVueRouterOptions) => {
|
||||
oldInstall(app);
|
||||
};
|
||||
|
||||
router.beforeEach((to: RouteLocationNormalized, _: RouteLocationNormalized, next: NavigationGuardNext) => {
|
||||
ionRouter.handleHistoryChange(to);
|
||||
next();
|
||||
});
|
||||
|
||||
return router;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user