Hello,
I’ve got a problem with the navigation in my app.
I’ve got an app where in homepage you have a list of people (with a unique identifier - uid) and if you click on a person you are forwarded in the chat-detail with that uid (so in the page where you can chat with the person), skipping the “tab-chat” tab (it’s a tab where you have a list of chats you opened like the “homepage” of whatsapp, with the list of the chats and if you click on a chat you go into the chat with that person).
The navigation problem there isn’t if I go in the chat-detail from the tab-chat, as it should do… But the problem is that I want when you go in the chat-detail from the homepage, you have to go back -not in homepage- in the tab-chats…
Is that possible? Because if I click in the button from the homepage it goes in the chat-detail, but nothing appear to come back… neither to go back in the homepage.
How to do what I want? I really don’t know what to do.
Here’s the app.js code for the views…
.state('tab.home', {
url: '/home',
views: {
'tab-home': {
templateUrl: 'templates/tab-home.html',
controller: 'HomeCtrl'
}
}
})
.state('tab.chats', {
cache: false,
url: '/chats',
views: {
'tab-chats': {
templateUrl: 'templates/tab-chats.html',
controller: 'ChatsCtrl'
}
}
})
.state('tab.chat-detail', {
cache: false,
url: '/chats/:chatId',
views: {
'tab-chats': {
templateUrl: 'templates/chat-detail.html',
controller: 'ChatDetailCtrl'
}
}
})
Thanks.