Selected Tab in Ionic framework
问题 I want to display two tabs that will be used to display similar data, but the tabs will be used to filter the information. My Tabs: import { Component } from '@angular/core'; import { DataPage } from './DataPage'; @Component({ template: ` <ion-tabs> <ion-tab tabIcon="heart" [root]="tab1"></ion-tab> <ion-tab tabIcon="star" [root]="tab2"></ion-tab> </ion-tabs>` }) class MyApp { tab1: any; tab2: any; constructor() { this.tab1 = DataPage; this.tab2 = DataPage; } } The page: import { Component }