Closed mlegenhausen closed 11 years ago
I found a solution by replacing the backMode
method with the following:
$location.backMode = function () {
$location.replace();
return this;
};
Maybe you can validate if this is a valid solution?
Sorry, but this will only allow to go back 1 step in history. But $location.backMode
is made to go back multiple steps. Your workaround will remove this functionality...
Tobias
Hi,
as far as I can see, the example works well now:
Clicking on the next buttons navigates forwards.
Clicking on the "back" button on the last page first navigates one step back to page "main1" and calls the function "previous", as specified in the call to $navigate("back", "previous")
.
As the function previous
on page1
does another navigate to page main
, we see another navigation and end up in total on page main
.
Could you check if this is the desired behavior?
Tobias
Looks good :) I will test it in our app and give you feedback. Thanks again :)
Solved.
Following fiddle illustrates the problem: http://jsfiddle.net/LRqp5/4/
Following steps:
What happens is that after the someFunction call I get another navigate to '#main2'.