[Ionic v4.0.0-beta.7] ion-back-button with defaultHref does not work when starting app on detail page
See original GitHub issueBug Report
Ionic Info
Run ionic info
from a terminal/cmd prompt and paste the output below.
This is an ionic-pwa-toolkit project:
"@ionic/core": "4.0.0-beta.7",
"@stencil/core": "0.12.4"
Describe the Bug ion-back-button with defaultHref does not work when starting app on detail page
Steps to Reproduce Steps to reproduce the behavior:
- clone ionic-pwa-toolkit
npm start
- go directly to detail page using the url
http://localhost:3333/profile/ionic
- click the
ion-back-button
- error:
You can't remove all the pages in the navigation stack. nav.pop() is probably called too many times.
Uncaught (in promise) Error: navigation stack needs at least one root page
Related Code https://github.com/ionic-team/ionic-pwa-toolkit
Expected Behavior
ion-back-button click should go back to url specified in defaultHref
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Ionic 4 | backButton disappears frequently · Issue #16315
If backButton shows on coupon-page or list-page, it always working well. The issue is, backButton sometimes shows but sometimes doesn't.
Read more >Ion-back-button not showing and not working - Ionic Forum
Hello, All, I am facing an unknown issue in ionic5/capacitor/angular project. it's just that component doesn't show if defaultHref is empty.
Read more >Why is the ion-back-button not shown? - Stack Overflow
defaultHref is of no use here. I only want to show the back button IF someone navigated forward (e.g. into a detail page)....
Read more >How to Build an Ionic 4 File Explorer
Working with files in Ionic and Cordova applications can be painful and ... To start, simply change your app/home/home.page.ts to this so you...
Read more >Source - GitHub
Change Log All notable changes to this project will be documented in this file. ... opening modal and popover now works even if...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ran into this issue as well. Here’s a codepen reproducing the bug. happens on beta.6 and beta.7 (worked on beta.5) beta.7 (broken) https://codepen.io/corysmc/pen/BOZYre?editors=1010
beta.5 (working) https://codepen.io/corysmc/pen/dqRmbg?editors=1010
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.