You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the Bug
If you have a project with different layouts (with splitpane / without or another), pages with the same splitpane layout will not work. It's hard to describe, so I've added a repository (see below) and a gif:
Steps to Reproduce
Click on "Open Dashboard". The splitpane appears.
Click on "Page 1" - everything is working
Click on "Fullscreen" and go back by tapping on "Open Dashboard".
Now try to open "Page 1" or "Page 2" again - it's not working
If I go back to home and open this route again, it's working until I leave the route, open a page with another layout and the same issue comes back
@paulstelzer I have the same issue, I have a split pane, I login, i logout, now all the split pane overlaps the app, the issue seems to be with the .menu-content-open
As a temporary workaround, you can set
Found a workaround (or maybe this will be the one and only working solution):
I removed the <ion-router-outlet> from app.component.html - so only one ion-router-outlet exist and then it's working. But another problem occurs now: Switching the pages will not close the menu and so the menu is always in front and has to be closed on mobile. For this I subscribe to the router events and when NavigationEnd i close the menu
@urbanjoe it's correct that you see the router-outlet destroyed message because I am destroy it (one page with sidebar -> going to fullscreen without sidebar, so the router oulet has to be destroyed). I make you a branch with a router-outlet destroyed and the navigation will still work ;) one moment
As you can see there is still the router-outlet destroyed, but this is CORRECT, because I destroy the ion-router-outlet if I change from one page to another. But as you can still see: the navigation is working ;)
Could it be rather ion-router-outlet related than split pane related issue? I have similar problem and the problem exists when removing split pane (but not another ion-router-outlet) and navigating using navController.navigateRoot or navController.navigateForward.
I can confirm that replacing <ion-router-outlet> on app.component.html with <router-outlet> works as a workaround.
@MattiLehtinen I think so, too that the root cause is ion-router-outlet. Many people describe this problem with ion-tabs (where ion-router-outlet is inside), too. I adjust the title of this issue
changed the title [-][4.0.0-beta.16] split-pane issues[/-][+][4.0.0-beta.16] ion-router-outlet issue with tabs or split-pane when switching the root component[/+]on Dec 16, 2018
Noticed that navigation with NavController seems to work as long as you navigate using navigateForward(). When using navigateRoot() it stops working and console says router-outlet destroyed.
Take a look into the DOM, you will see that on navigateRoot the component will removed from the DOM and so it's correct that router-outlet destroyed will logged ;) On navigateForward, the page will be hidden ( router-outlet is still there)
changed the title [-][4.0.0-beta.16] ion-router-outlet issue with tabs or split-pane when switching the root component[/-][+][4.0.0-beta.16] ion-router-outlet issue tabs split-pane navigation broken / stops working[/+]on Dec 16, 2018
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Activity
romain10009 commentedon Nov 26, 2018
@paulstelzer I have the same issue, I have a split pane, I login, i logout, now all the split pane overlaps the app, the issue seems to be with the .menu-content-open

As a temporary workaround, you can set
paulstelzer commentedon Nov 30, 2018
Found a workaround (or maybe this will be the one and only working solution):
I removed the
<ion-router-outlet>fromapp.component.html- so only one ion-router-outlet exist and then it's working. But another problem occurs now: Switching the pages will not close the menu and so the menu is always in front and has to be closed on mobile. For this I subscribe to the router events and when NavigationEnd i close the menuurbanjoe commentedon Dec 14, 2018
@paulstelzer: Just gave it a shoot, but'll get a router-outlet destroyed message in the console running our repo:
paulstelzer commentedon Dec 14, 2018
@urbanjoe it's correct that you see the router-outlet destroyed message because I am destroy it (one page with sidebar -> going to fullscreen without sidebar, so the router oulet has to be destroyed). I make you a branch with a router-outlet destroyed and the navigation will still work ;) one moment
paulstelzer commentedon Dec 14, 2018
@urbanjoe Is mentioned above I added an ISSUE, so my repo isn't working of course ;)
I added a new branch WORKING -> https://github.com/paulstelzer/test-splitpane/tree/working
This includes my workaround described here -> #16411 (comment)
As you can see there is still the router-outlet destroyed, but this is CORRECT, because I destroy the ion-router-outlet if I change from one page to another. But as you can still see: the navigation is working ;)
MattiLehtinen commentedon Dec 15, 2018
Could it be rather ion-router-outlet related than split pane related issue? I have similar problem and the problem exists when removing split pane (but not another ion-router-outlet) and navigating using
navController.navigateRootornavController.navigateForward.I can confirm that replacing
<ion-router-outlet>onapp.component.htmlwith<router-outlet>works as a workaround.Code to reproduce with split pane commented out: https://github.com/MattiLehtinen/ion-router-outlet-test
paulstelzer commentedon Dec 16, 2018
@MattiLehtinen I think so, too that the root cause is
ion-router-outlet. Many people describe this problem withion-tabs(whereion-router-outletis inside), too. I adjust the title of this issue[-][4.0.0-beta.16] split-pane issues[/-][+][4.0.0-beta.16] ion-router-outlet issue with tabs or split-pane when switching the root component[/+]MattiLehtinen commentedon Dec 16, 2018
Noticed that navigation with NavController seems to work as long as you navigate using
navigateForward(). When usingnavigateRoot()it stops working and console says router-outlet destroyed.paulstelzer commentedon Dec 16, 2018
Take a look into the DOM, you will see that on navigateRoot the component will removed from the DOM and so it's correct that router-outlet destroyed will logged ;) On navigateForward, the page will be hidden ( router-outlet is still there)
Eraldo commentedon Dec 16, 2018
Sadly I cannot confirm the workaround. :|
Does not seem to do the trick for my use case.
[-][4.0.0-beta.16] ion-router-outlet issue with tabs or split-pane when switching the root component[/-][+][4.0.0-beta.16] ion-router-outlet issue tabs split-pane navigation broken / stops working[/+]paulstelzer commentedon Dec 16, 2018
That's no problem. We have maybe a fix for it and will test it with beta.19 which I hope will coming soon :)
fix(angular): fix sibling router-outlets
fix(angular): fix sibling router-outlets (#16774)
ionitron-bot commentedon Jan 16, 2019
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.