Created
July 31, 2017 10:51
-
-
Save JaimeSarrion/ede8f8293aee3c78e7d3d822848d84d1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.html | |
<ion-tabs [selectedIndex]="myIndex"> | |
<ion-tab [root]="tab1Root" tabTitle="Inicio" tabIcon="home"></ion-tab> | |
<ion-tab [root]="tab2Root" tabTitle="Tarjeta" tabIcon="card"></ion-tab> | |
<ion-tab [root]="tab3Root" tabTitle="Comercios" tabIcon="basket"></ion-tab> | |
<ion-tab [root]="tab4Root" tabTitle="Ofertas" tabIcon="pricetag"></ion-tab> | |
</ion-tabs> | |
.ts | |
import { Component } from '@angular/core'; | |
import { IonicPage, NavController, NavParams } from 'ionic-angular'; | |
@IonicPage({ | |
name: 'menu-tabs-page' | |
}) | |
@Component({ | |
selector: 'page-menu-tabs', | |
templateUrl: 'menu-tabs.html', | |
}) | |
export class MenuTabsPage { | |
tab1Root : any = 'home-page'; | |
tab2Root : any = 'tarjeta-page'; | |
tab3Root : any = 'establecimientos-page'; | |
tab4Root : any = 'listado-ofertas-page'; | |
myIndex : number; | |
constructor( public navParams: NavParams) { | |
this.myIndex = this.navParams.data.tabIndex || 0; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment