docs(demos): text only tab example

This commit is contained in:
Drew Rygh
2015-11-03 11:39:44 -06:00
parent 4759193752
commit bb8f87faa7

View File

@ -3,40 +3,17 @@ import {Page, ViewController} from 'ionic/ionic';
import {forwardRef} from 'angular2/angular2'; import {forwardRef} from 'angular2/angular2';
import * as helpers from '../helpers'; import * as helpers from '../helpers';
var TABS_DEMO_TMPL = '' +
@Page({
template: '' +
'<ion-navbar *navbar hide-back-button class="android-attr">' + '<ion-navbar *navbar hide-back-button class="android-attr">' +
'<ion-title>Tabs</ion-title>' + '<ion-title>Tabs</ion-title>' +
'</ion-navbar>' + '</ion-navbar>' +
'<ion-content>' + '<ion-content>' +
'</ion-content>'; '</ion-content>',
@Page({
template: TABS_DEMO_TMPL,
directives: [forwardRef(() => helpers.AndroidAttribute)], directives: [forwardRef(() => helpers.AndroidAttribute)],
}) })
class TabOneCtrl { class TabTextCtrl {
constructor(nav: NavController, view: ViewController) {
this.nav = nav;
this.view = view;
}
}
@Page({
template: TABS_DEMO_TMPL,
directives: [forwardRef(() => helpers.AndroidAttribute)],
})
class TabTwoCtrl {
constructor(nav: NavController, view: ViewController) {
this.nav = nav;
this.view = view;
}
}
@Page({
template: TABS_DEMO_TMPL,
directives: [forwardRef(() => helpers.AndroidAttribute)],
})
class TabThreeCtrl {
constructor(nav: NavController, view: ViewController) { constructor(nav: NavController, view: ViewController) {
this.nav = nav; this.nav = nav;
this.view = view; this.view = view;
@ -46,16 +23,16 @@ class TabThreeCtrl {
@Page({ @Page({
template: template:
'<ion-tabs>' + '<ion-tabs>' +
'<ion-tab tab-title="Food" tab-icon="pizza" [root]="tabOne"></ion-tab>' + '<ion-tab tab-title="Music" [root]="tabOne"></ion-tab>' +
'<ion-tab tab-title="Drinks" tab-icon="beer" [root]="tabTwo"></ion-tab>' + '<ion-tab tab-title="Movies" [root]="tabTwo"></ion-tab>' +
'<ion-tab tab-title="Hours" tab-icon="clock" [root]="tabThree"></ion-tab>' + '<ion-tab tab-title="Games" [root]="tabThree"></ion-tab>' +
'</ion-tabs>', '</ion-tabs>',
}) })
export class TabsPage { export class TabsPage {
constructor(nav: NavController, params: NavParams) { constructor(nav: NavController, params: NavParams) {
this.nav = nav; this.nav = nav;
this.tabOne = TabOneCtrl; this.tabOne = TabTextCtrl;
this.tabTwo = TabTwoCtrl; this.tabTwo = TabTextCtrl;
this.tabThree = TabThreeCtrl; this.tabThree = TabTextCtrl;
} }
} }