It may be difficult to explain, but I will try: I use the ionic infrastructure and ui-router in my application and have the following situation:
.state('tab.promoAward', {
url: "/promoAward/:id",
views: {
'tab-search': {
templateUrl: 'templates/customer/promoAward.html',
controller: 'promoAwardCtrl',
},
'tab-favourites': {
templateUrl: 'templates/customer/promoAward.html',
controller: 'promoAwardCtrl',
},
},
})
As you can see, I want to display the same child view (awards) for other parent tabs (search and favorites). The above example works, but if I am in the tab state when promoAwardCtrl is called, then the application automation goes to the favorite tabs (I want to stay in the tab state) and I lose the back button (to the prevoius state).
Any ideas how to solve this problem?
/ ************** EDIT *************** /
Decision:
.state('tab.promoAward', {
url: '/promoAward/:id',
views: {
'':{
},
'tab-search@tab': {
controller: 'promoAwardCtrl',
templateUrl: 'templates/customer/promoAward.html'
},
'tab-favourites@tab': {
controller: 'promoAwardCtrl',
templateUrl: 'templates/customer/promoAward.html'
},
},
})
Thanks for all the answers.