-
Notifications
You must be signed in to change notification settings - Fork 0
Navbar
wenbobao edited this page Oct 12, 2017
·
1 revision
ion-navbar作为一个导航工具栏,带有一个返回按钮。导航条可以包含一个ion-title、任意数量的按钮、一个段或一个searchbar。导航条必须放置在ion-header中,以便将它们置于内容之上。值得注意的是,导航栏是动态导航堆栈的一部分。如果需要一个静态工具栏,请使用ion-toolbar。
<ion-header>
<!--导航栏组件-->
<ion-navbar>
<!--左侧按钮-->
<ion-buttons start>
<button ion-button>
<ion-icon name="menu"></ion-icon>
</button>
<button ion-button>
<ion-icon name="menu"></ion-icon>
</button>
</ion-buttons>
<!--Title-->
<ion-title>
Ionic Blank
</ion-title>
<!--右侧按钮-->
<ion-buttons end>
<button ion-button>
<ion-icon name="menu"></ion-icon>
</button>
</ion-buttons>
</ion-navbar>
</ion-header>
1. backButtonClick()
2. setBackButtonText() // Set the text of the Back Button in the Nav Bar. Defaults to “Back”.
| 属性 | 类型 | 详解 |
|---|---|---|
| hideBackButton | boolean | 如果true,返回按钮会被隐藏 |