Load detail page from anywhere in the app

hi , am i have tab based layout , for this is design

.state('tab.parties', { url: '/parties', views: { 'tab-parties': { templateUrl: 'templates/tabs/tab-parties.html', controller: 'PartyListCtrl' } } }) .state('tab.party-detail', { url: '/parties/:id', views: { 'tab-parties': { templateUrl: 'templates/tabs/party-detail.html', controller: 'PartyDetailCtrl' } } }) .state('tab.trending', { url: '/trending', views: { 'tab-trending': { templateUrl: 'templates/tabs/tab-trending.html', controller: 'PartyTrendingCtrl' } } })

how do load the tab.parties.detail page from the trending while passing the id the same way

Could you clarifiy your question?

i want to load the detail page from the trending page
but since the detail page is need to seed it from the party page

.state('tab.party-detail', { url: '/parties/:id', views: { // tab-parties as a child state 'tab-parties': { templateUrl: 'templates/tabs/party-detail.html', controller: 'PartyDetailCtrl'

when i load from the trending page i lost the back button and also changes to tab parties , i dont want to create another page , i was hoping for the a more javascript way to load the details without everything losing state

You can create 2 states pointing to the same view

.state(‘tab.parties’, {
url: ‘/parties’,
views: {
‘tab-parties’: {
templateUrl: ‘templates/tabs/tab-parties.html’,
controller: ‘PartyListCtrl’
}
}
})

//Here
.state(‘tab.party-detail1’, {
url: ‘/parties/party-detail1/:id’,
views{
‘tab-parties’: {
templateUrl: ‘templates/tabs/party-detail.html’,
controller: ‘PartyDetailCtrl’
}
}
})

.state(‘tab.trending’, {
url: ‘/trending’,
views: {
‘tab-trending’: {
templateUrl: ‘templates/tabs/tab-trending.html’,
controller: ‘PartyTrendingCtrl’
}
}
})

//And Here
.state(‘tab.party-detail2’, {
url: ‘/trending/party-detail2/:id’,
views-party: {
‘tab-trending’: {
templateUrl: ‘templates/tabs/party-detail.html’,
controller: ‘PartyDetailCtrl’
}
})

now you call party-datail1 on party and party-datail2 on trending

Depending on what you want to achieve, you may encounter issues by re-using PartyDetailCtrl for your 2 states as Ionic caching will load your controller only once.