title: Selected Tab in Ionic framework
body: <p>I want to display two tabs that will be used to display similar data, but the tabs will be used to filter the information.</p>
  
  <p>My Tabs:</p>
  
  <pre><code>import { Component } from '@angular/core';
  import { DataPage } from './DataPage';
  
  @Component({
      template: `
        &lt;ion-tabs&gt;
          &lt;ion-tab tabIcon="heart" [root]="tab1"&gt;&lt;/ion-tab&gt;
          &lt;ion-tab tabIcon="star" [root]="tab2"&gt;&lt;/ion-tab&gt;
        &lt;/ion-tabs&gt;`
  })
  class MyApp {
  
      tab1: any;
      tab2: any;
  
      constructor() {
        this.tab1 = DataPage;
        this.tab2 = DataPage;
      }
  }
  </code></pre>
  
  <p>The page:</p>
  
  <pre><code>import { Component } from '@angular/core';
  import { NavController } from 'ionic-angular';
  
  @Component({
  
  })
  class DataPage {
  
     constructor(public navCtrl: NavController) {
       //********************
       //Here I want to know which tab was selected
       //********************
       console.log("SELECTED TAB")
     }
  }
  </code></pre>
  
  <p>When the DataPage is called I need to know from which tab was it initiated. Is there a way to find out which tab was selected or should I just duplicate the DataPage(it feels redundant)?. </p>
  
  <p>Thank You!</p>