ionic4 离子后退按钮默认 href 不工作

ionic4 ion-back-button default-href not working

所以我有这个 url:

https://todo-ionic.thehangrycoder.now.sh/todo/new

通常您通过

到达此页面

https://todo-ionic.thehangrycoder.now.sh/todo/

然后详细信息页面将有一个返回按钮,返回到 Todo 概览。

但是当你直接进入https://todo-ionic.thehangrycoder.now.sh/todo/new时......它仍然显示后退按钮,但是当按下时,它没有做任何事情。

我正在使用默认 href:

<ion-buttons slot="start">
 <ion-back-button default-href="/todo"></ion-back-button>
</ion-buttons>

完整项目位于:https://github.com/fransyozef/todo-challenge/tree/master/frontend/ionic4/todo-app

页面的 ts 和 html:https://github.com/fransyozef/todo-challenge/tree/master/frontend/ionic4/todo-app/src/app/todo/todo-detail

您必须像这样使用后退按钮:

<ion-buttons slot="start">
  <ion-back-button text="" defaultHref="/"></ion-back-button>
</ion-buttons>