I am on #loc1. On button click I want to go to #loc3 from #loc1, in such a way that doing back from #loc3 should take me to #loc2. Is that possible in Angularjs?
Thanks in advance.
I am on #loc1. On button click I want to go to #loc3 from #loc1, in such a way that doing back from #loc3 should take me to #loc2. Is that possible in Angularjs?
Thanks in advance.
You can force to go backward without taking in consideration .back() state.
Example:(set for each location to go backward with 1 route)
$location.path('/yourLocation').replace();