title: Ionic 3 How to close modal with Tabs and pass data to parent
body: <p>Is this possible to create modal with contains Tabs and when select item pass data to parent view?</p>
  
  <p>I known that Tabs have own, separate history stack so if is not possible what is best way to implement that like Tabs-looking way?</p>
  
  <p>Creating modal with tabs from parent view:</p>
  
  <pre><code>selectContractor() {        
      let contractorsModal = this.modalCtrl.create('VisitAddTabsPage', {routeId: this.routeId});
      contractorsModal.present();
      contractorsModal.onDidDismiss(data =&gt; {
          console.log(data);
      })
  }
  </code></pre>
  
  <p><strong>VisitAddTabsPage.ts</strong></p>
  
  <pre><code>@Component({
   selector: 'page-visit-add-tabs',
   templateUrl: 'visit-add-tabs.html'
  })
  @IonicPage()
  export class VisitAddTabsPage {
  
  ownContractorsRoot = 'OwnContractorsPage'
  closestContractorsRoot = 'ClosestContractorsPage'
  allContractorsRoot = 'AllContractorsPage'
  
  constructor(public navCtrl: NavController,
              public navParams: NavParams,
              public viewCtrl: ViewController) {
  }
  }
  </code></pre>
  
  <p><strong>visit-add-tabs.html</strong></p>
  
  <pre><code>&lt;ion-tabs tabsPlacement="top" selectedIndex="1"&gt;
  &lt;ion-tab [root]="ownContractorsRoot" tabTitle="Moi" tabUrlPath="own" tabIcon="star"&gt;&lt;/ion-tab&gt;
  &lt;ion-tab [root]="closestContractorsRoot" tabTitle="W pobliżu" tabUrlPath="closest" tabIcon="locate"&gt;&lt;/ion-tab&gt;
  &lt;ion-tab [root]="allContractorsRoot" tabTitle="Wszyscy" tabUrlPath="all" tabIcon="contacts"&gt;&lt;/ion-tab&gt;
  &lt;/ion-tabs&gt;
  </code></pre>
  
  <p>Closest-contractors tab (<strong>closest-contractors.ts</strong>)</p>
  
  <pre><code>    handleSelectedContractor(data) {
      console.log(this.navCtrl);
      console.log(this.appCtrl.getRootNav());
      //this.viewCtrl.dismiss(data); &lt;-- HOW TO DISMISS MODAL (and TABS) AND PASS DATA
  }
  </code></pre>