Tabs template + kind of global search

<ion-nav-bar class="bar-stable">

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

  <ion-tab title="Home" icon-off="ion-ios-home-outline" icon-on="ion-ios-home" ui-sref="app.home">
    <ion-nav-view name="tab-home"></ion-nav-view>

  <ion-tab title="Promoções" icon-off="ion-ios-gear-outline" icon-on="ion-ios-gear" ui-sref="app.offers">
    <ion-nav-view name="tab-offers"></ion-nav-view>

I have 2 named views (tabs). Each view defines an ion-nav-title like this one:


sos-header is a header that contains a search input. When user taps it, I want to go to search state and the search template should be shown in the current named view. For example, if I am in the home state and I tap search, the search template should be shown in the <ion-nav-view name="tab-home">.

Trying to define search state:

			.state('', {
				url: '/search',
				controller: 'SearchCtrl as vm',
				views: {
					'tab-home': {
						templateUrl: 'app/search/templates/search.html'
					'tab-offers': {
						templateUrl: 'app/search/templates/search.html'

It doesn’t work… something weird happens. When in home state, I tap search and the search template is shown, however the offers tab is selected, that is, I was redirected to the offers state.

Any ideas? PLUNKER