Closed chilupa closed 4 years ago
Thanks for the issue. I am going to close this as this is not a bug in Ionic Framework. There are a couple issues here:
ion-back-button
does not show up unless there are pages in the navigation stack. What this means is that if you navigate directly to /about
, the back button will not show up because there are no pages to "navigate back to". Using defaultHref
works because that will set the default path to go back to when there are no pages in the stack, forcing the back button to appear.
Because you are using bindings, Angular expects Back
and arrow-back
to be variables in your TypeScript code. It looks like you meant for these values to be strings, in which case you should just do text="Back"
and icon="arrow-back"
.
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.
Bug Report
Ionic version:
[ ] 4.x [x] 5.x
Current behavior:
<ion-back-button>
is not showing up in the toolbar when provided[text]
and[icon]
but works only whendefaultHref
attribute is specified.Expected behavior:
It should work both ways. I should be able to choose the
text
andicon
of my wishSteps to reproduce:
Create any page and place this as your header
Related code:
Below is my code repo where I could replicate the issue. Run this locally and go to
/about
page. You won't be able to see the back button thought it is specified. https://github.com/chilupa/ionic5-infinite-scroll-postion-top/blob/master/src/app/about/about.page.htmlOther information:
Ionic info: