Skip to content

Commit

Permalink
docs(tabs): update API docs for tabs
Browse files Browse the repository at this point in the history
references #5819
  • Loading branch information
brandyscarney committed Apr 11, 2016
1 parent f104603 commit 5d08a5d
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions ionic/components/tabs/tabs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ import {isBlank, isTrueProperty} from '../../util/util';
*
* 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
* the `select()` method. This requires the `<ion-tab>` element to have an
* `id`. For example, set the `id` to `myTabs`:
* the `select()` method. This requires the `<ion-tabs>` element to have
* an `id`. For example, set the `id` to `myTabs`:
*
* ```html
* <ion-tabs id="myTabs">
Expand All @@ -71,9 +71,13 @@ import {isBlank, isTrueProperty} from '../../util/util';
* ```
*
* 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
* constructor(app: IonicApp) {
* this.app = app;
* }
*
* onPageDidEnter() {
* let tabs = this.app.getComponent('myTabs');
* tabs.select(2);
Expand All @@ -83,8 +87,10 @@ import {isBlank, isTrueProperty} from '../../util/util';
*
* @usage
* ```html
* <ion-tabs>
* <ion-tab [root]="tabRoot"></ion-tab>
* <ion-tabs [selectedIndex]="mySelectedIndex" tabbarLayout="icon-bottom" secondary>
* <ion-tab [root]="tab1Root"></ion-tab>
* <ion-tab [root]="tab2Root"></ion-tab>
* <ion-tab [root]="tab3Root"></ion-tab>
* </ion-tabs>
* ```
*
Expand Down

0 comments on commit 5d08a5d

Please sign in to comment.