The app has pages, X, Y and Z. So the routing should be as follows I go into page X and then select some details and then go to page Y and then select some more details and then go to Z. So I want that after going to Z page once I click window back button it should go to page X and not page Y. While going from Y to Z, I also tried adding { location: 'replace' } in $state.go but it doesn't work. Any ideas on how to achieve that ?
Thanks