If an unhandled error occurs during routing (such as when leaving a Page), the navigation transition will not complete and subsequent attempts at routing will not render the Page correctly. You end up seeing parts of multiple Pages at the same time, and you can see them rendered outside of the ion-router-outlet in the DOM.
Expected behavior:
I would expect that navigation transitions themselves would still complete even if there's an unhandled error in a Page/Component that may cause an issue for that particular Page/Component. I'd expect the router/router outlet to complete navigating to the Page by updating the URL and placing the Page in the ion-router-outlet.
On the menu on the left, click on any menu items except Trash. The Page on the right should render these correctly.
Now click Trash. Then click a different menu item. You'll see an error in the console that is hard-coded and is thrown in FolderPage's ngOnDestroy.
Continue clicking on non-Trash menu items. You'll start to see multiple Pages on the screen that failed to load. In the DOM you'll see the failed Pages sibling to ion-router-outlet.
Bug Report
Ionic version:
[ ] 4.x [x] 5.x
Current behavior:
If an unhandled error occurs during routing (such as when leaving a Page), the navigation transition will not complete and subsequent attempts at routing will not render the Page correctly. You end up seeing parts of multiple Pages at the same time, and you can see them rendered outside of the
ion-router-outlet
in the DOM.Expected behavior:
I would expect that navigation transitions themselves would still complete even if there's an unhandled error in a Page/Component that may cause an issue for that particular Page/Component. I'd expect the router/router outlet to complete navigating to the Page by updating the URL and placing the Page in the
ion-router-outlet
.Steps to reproduce:
npx ionic serve
Trash
. The Page on the right should render these correctly.Trash
. Then click a different menu item. You'll see an error in the console that is hard-coded and is thrown inFolderPage
'sngOnDestroy
.Trash
menu items. You'll start to see multiple Pages on the screen that failed to load. In the DOM you'll see the failed Pages sibling toion-router-outlet
.Related code:
Clone this repo: https://github.com/KevinKelchen/ionic-routing-error Follow the Steps to reproduce.
Other information:
Ionic info: