Pregunta

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.

¿Fue útil?

Solución 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.

Otros consejos

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();
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top