문제

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.

도움이 되었습니까?

해결책 2

I think there does not exist any method to achieve this. I solved it by forcing the browser to #loc2 from #loc1. From #loc2 I forced it to #loc3, so that the back button takes it back to #loc2.

다른 팁

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();
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top