chore(): sync with main for beta 5 release

This commit is contained in:
Liam DeBeasi
2021-09-01 10:14:58 -04:00
13 changed files with 219 additions and 11 deletions

View File

@ -20,6 +20,14 @@ export const createViewStacks = (router: Router) => {
const registerIonPage = (viewItem: ViewItem, ionPage: HTMLElement) => {
viewItem.ionPageElement = ionPage;
viewItem.ionRoute = true;
/**
* This is needed otherwise Vue Router
* will not consider this component mounted
* and will not run route guards that
* are written in the component.
*/
viewItem.matchedRoute.instances = { default: viewItem.vueComponentRef.value };
}
const findViewItemByRouteInfo = (routeInfo: RouteInfo, outletId?: number) => {
@ -186,6 +194,7 @@ export const createViewStacks = (router: Router) => {
viewItem.mount = false;
viewItem.ionPageElement = undefined;
viewItem.ionRoute = false;
viewItem.matchedRoute.instances = {};
}
}