Tabs + nested views


#1

Hi, I have 4 tabs with 4 lists.

Basically there are the same items in each tab just filtered in different ways (i.e. trending, latest, etc…)

I would like to have a “common” view when you click on one of the items (in every tab).

.state('app', {
  url: '/app',
  abstract: true,
  templateUrl: 'templates/home.html',
  controller: 'TabsCtrl'
})

.state('app.tab1', {
  url: '/tab1',
  views: {
    'app-tab1': {
      templateUrl: 'templates/tabs/tab1.html'
    }
  }
})

//tab2 (like tab1)
// ... //

//tab3 (like tab1)
// ... //

//tab4 (like tab1)
// ... //

.state('app.item', {
  url: '/item',
  views: {
    'app-tab1': {
      templateUrl: 'templates/item.html'
    }
  }
})

How can I make a common state for all the tabs? I need to handle also the back button.

.state('app.item', {
  url: '/item',
  views: {
    'app-tab1': { <-- common for all the tabs
      templateUrl: 'templates/item.html'
    }
  }
})

Thanks