Imagine having two tabs within my application: tab-one
and tab-two
. I am trying to navigate from the view of tab-one (one.html) to the view of tab-two (two.html). I have attempted using $state.go(), $location, and $window.location but none of them seem to work. Navigating to any views is successful if they are all under the same tab, even with different controllers. However, navigation does not function properly when the views belong to different tabs. The code below displays the states defined in the app.js file:
.state('tab.tasklist', {
url: '/tasklist',
views: {
'tab-one@tab': {
templateUrl: 'templates/one.html',
controller: 'OneCtrl'
}
}
})
.state('tab.ccpo', {
url: '/ccpo',
views: {
'tab-two@tab': {
templateUrl: 'templates/two.html',
controller: 'AnotherCtrl'
}
}
})