Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49176

Link multiple ionic tabs to same view?

$
0
0

@TakeTime wrote:

Crossposting: http://stackoverflow.com/questions/39478431/link-multiple-ionic-tabs-to-same-view

Is it possible to have different tabs link to the same view? Right now I have:

<ion-tabs class="tabs-icon-top tabs-color-active-positive">

  <ion-tab title="Dashboard" icon-off="ion-ios-speedometer-outline" icon-on="ion-ios-speedometer" active="active.dashboard" >
    <ion-nav-view name="tab-app"></ion-nav-view>
  </ion-tab>

  <ion-tab title="Reports" icon-off="ion-ios-pie-outline" icon-on="ion-ios-pie">
    <ion-nav-view name="tab-app"></ion-nav-view>
  </ion-tab>

  <ion-tab title="Create" icon-off="ion-ios-plus" icon-on="ion-plus-circled" >
    <ion-nav-view name="tab-app"></ion-nav-view>
  </ion-tab>

  <ion-tab title="Approvals" icon-off="ion-ios-bell-outline" icon-on="ion-ios-bell">
    <ion-nav-view name="tab-app"></ion-nav-view>
  </ion-tab>

  <ion-tab title="Settings" icon-off="ion-ios-gear-outline" icon-on="ion-ios-gear" href="#/tab/settings">
    <ion-nav-view name="tab-settings"></ion-nav-view>
  </ion-tab>

</ion-tabs>

However, each one of these tabs are just a different instance of tab-app, the controller gets reloaded and they do not share any properties.

How can I make the tabs share the same view? I'd like to link them together and have the controller act on whatever tab has been selected. Thanks!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49176

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>