docs(tabs): update API docs for tabs

references #5819
This commit is contained in:
Brandy Carney
2016-04-11 18:23:22 -04:00
parent f1046032b1
commit 5d08a5d422

View File

@ -59,8 +59,8 @@ import {isBlank, isTrueProperty} from '../../util/util';
* *
* Since the index starts at `0`, this will select the 3rd tab which has * Since the index starts at `0`, this will select the 3rd tab which has
* root set to `tab3Root`. You can also grab the `Tabs` instance and call * root set to `tab3Root`. You can also grab the `Tabs` instance and call
* the `select()` method. This requires the `<ion-tab>` element to have an * the `select()` method. This requires the `<ion-tabs>` element to have
* `id`. For example, set the `id` to `myTabs`: * an `id`. For example, set the `id` to `myTabs`:
* *
* ```html * ```html
* <ion-tabs id="myTabs"> * <ion-tabs id="myTabs">
@ -71,9 +71,13 @@ import {isBlank, isTrueProperty} from '../../util/util';
* ``` * ```
* *
* Then in your JavaScript you can grab the `Tabs` instance and call `select()`. * Then in your JavaScript you can grab the `Tabs` instance and call `select()`.
* In the following code `app` is of type `IonicApp`: * In the following code `app` is of type [`IonicApp`](../../app/IonicApp/):
* *
*```js *```js
* constructor(app: IonicApp) {
* this.app = app;
* }
*
* onPageDidEnter() { * onPageDidEnter() {
* let tabs = this.app.getComponent('myTabs'); * let tabs = this.app.getComponent('myTabs');
* tabs.select(2); * tabs.select(2);
@ -83,8 +87,10 @@ import {isBlank, isTrueProperty} from '../../util/util';
* *
* @usage * @usage
* ```html * ```html
* <ion-tabs> * <ion-tabs [selectedIndex]="mySelectedIndex" tabbarLayout="icon-bottom" secondary>
* <ion-tab [root]="tabRoot"></ion-tab> * <ion-tab [root]="tab1Root"></ion-tab>
* <ion-tab [root]="tab2Root"></ion-tab>
* <ion-tab [root]="tab3Root"></ion-tab>
* </ion-tabs> * </ion-tabs>
* ``` * ```
* *