I got three views, cars index, car picture and misc view. From index there’s links to car picture. If I move like this: 1. Index, 2. Open picture, 3. Go to misc view (under tabs), 4. Click the ‘cars index’ tab, the previous car picture view opens. Desired option would be to go into the index again.
.state('tab.cars-index', {
url: '/cars',
views: { 'cars-tab': {
templateUrl: 'templates/car-index.html',
controller: 'carIndexCtrl'
}}})
.state('tab.car-picture', {
url: "/picture/:id",
views: { 'cars-tab': {
templateUrl: "templates/car-picture.html",
controller: 'PictureCtrl' }}})
.state('tab.other', {
url: "/other",
views: { 'other-tab': {
templateUrl: "templates/car-picture.html",
controller: 'PictureCtrl' }}})
So the tab.car-picture should have views: {‘someother-tab’}, but if I put something else there, it doesn’t work anymore. What am I doing wrong?