mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
docs(demos): text only tab example
This commit is contained in:
@ -3,40 +3,17 @@ import {Page, ViewController} from 'ionic/ionic';
|
||||
import {forwardRef} from 'angular2/angular2';
|
||||
import * as helpers from '../helpers';
|
||||
|
||||
var TABS_DEMO_TMPL = '' +
|
||||
'<ion-navbar *navbar hide-back-button class="android-attr">' +
|
||||
'<ion-title>Tabs</ion-title>' +
|
||||
'</ion-navbar>' +
|
||||
'<ion-content>' +
|
||||
'</ion-content>';
|
||||
|
||||
@Page({
|
||||
template: TABS_DEMO_TMPL,
|
||||
template: '' +
|
||||
'<ion-navbar *navbar hide-back-button class="android-attr">' +
|
||||
'<ion-title>Tabs</ion-title>' +
|
||||
'</ion-navbar>' +
|
||||
'<ion-content>' +
|
||||
'</ion-content>',
|
||||
directives: [forwardRef(() => helpers.AndroidAttribute)],
|
||||
})
|
||||
class TabOneCtrl {
|
||||
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 {
|
||||
class TabTextCtrl {
|
||||
constructor(nav: NavController, view: ViewController) {
|
||||
this.nav = nav;
|
||||
this.view = view;
|
||||
@ -46,16 +23,16 @@ class TabThreeCtrl {
|
||||
@Page({
|
||||
template:
|
||||
'<ion-tabs>' +
|
||||
'<ion-tab tab-title="Food" tab-icon="pizza" [root]="tabOne"></ion-tab>' +
|
||||
'<ion-tab tab-title="Drinks" tab-icon="beer" [root]="tabTwo"></ion-tab>' +
|
||||
'<ion-tab tab-title="Hours" tab-icon="clock" [root]="tabThree"></ion-tab>' +
|
||||
'<ion-tab tab-title="Music" [root]="tabOne"></ion-tab>' +
|
||||
'<ion-tab tab-title="Movies" [root]="tabTwo"></ion-tab>' +
|
||||
'<ion-tab tab-title="Games" [root]="tabThree"></ion-tab>' +
|
||||
'</ion-tabs>',
|
||||
})
|
||||
export class TabsPage {
|
||||
constructor(nav: NavController, params: NavParams) {
|
||||
this.nav = nav;
|
||||
this.tabOne = TabOneCtrl;
|
||||
this.tabTwo = TabTwoCtrl;
|
||||
this.tabThree = TabThreeCtrl;
|
||||
this.tabOne = TabTextCtrl;
|
||||
this.tabTwo = TabTextCtrl;
|
||||
this.tabThree = TabTextCtrl;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user