question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Ionic v4.0.0-beta.7] ion-back-button with defaultHref does not work when starting app on detail page

See original GitHub issue

Bug 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:

  1. clone ionic-pwa-toolkit
  2. npm start
  3. go directly to detail page using the url http://localhost:3333/profile/ionic
  4. click the ion-back-button
  5. 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:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
corysmccommented, Sep 4, 2018

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

0reactions
ionitron-bot[bot]commented, Oct 13, 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found