[英]Ionic2/Angular2 - Hide the back button on the modal view that was inherited from the navigation view
我有一個模態視圖,一旦單擊該模態中的元素,它就會進入導航視圖(通常會出現一個后退按鈕)。 問題是,當你從導航回彈到模態時,除了我已經在模態上的關閉按鈕之外,還會出現一個新的后退按鈕(這是我要隱藏的按鈕)。
關於如何隱藏模態中的后退按鈕的任何想法?
嘗試使用hideBackButton指令
<ion-navbar hideBackButton *navbar primary>
<ion-title>My Page</ion-title>
<ion-buttons end>
<button (click)="dismiss()">
<ion-icon name="close"></ion-icon>
</button>
</ion-buttons>
</ion-navbar>
如果你還沒有看過關於離子模態的這篇文章看看。 如果您已經有后退按鈕,則應該能夠刪除隨附的關閉/返回按鈕。 確保你的模態模板中沒有這個:
<button (click)="close()">Close</button>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.