ion-tab
Child of ionTabs
Contains a tab’s content. The content only exists while the given tab is selected.
Each ionTab has its own view history.
Usage
<ion-tab
title="Tab!"
icon="my-icon"
href="#/tab/tab-link"
on-select="onTabSelected()"
on-deselect="onTabDeselected()">
</ion-tab>
For a complete, working tab bar example, see the ionTabs
documentation.
API
Attr | Type | Details |
---|---|---|
title |
string
|
The title of the tab. |
href
(optional)
|
string
|
The link that this tab will navigate to when tapped. |
icon
(optional)
|
string
|
The icon of the tab. If given, this will become the default for icon-on and icon-off. |
icon-on
(optional)
|
string
|
The icon of the tab while it is selected. |
icon-off
(optional)
|
string
|
The icon of the tab while it is not selected. |
badge
(optional)
|
expression
|
The badge to put on this tab (usually a number). |
badge-style
(optional)
|
expression
|
The style of badge to put on this tab (eg: badge-positive). |
on-select
(optional)
|
expression
|
Called when this tab is selected. |
on-deselect
(optional)
|
expression
|
Called when this tab is deselected. |
ng-click
(optional)
|
expression
|
By default, the tab will be selected on click. If ngClick is set, it will not. You can explicitly switch tabs using $ionicTabsDelegate.select(). |
hidden
(optional)
|
expression
|
Whether the tab is to be hidden or not. |
disabled
(optional)
|
expression
|
Whether the tab is to be disabled or not. |