Back button respecting location:replace

This seems like a bug but it may be intentional. When I go to a view using

$state.go('blah', {}, {location: 'replace'})

It correctly changes the browser’s back button so that the page will be skipped over. But


does not respect this. It just acts as if the location:‘replace’ wasn’t specified.

Same Here T_T. Please help

I’ve got the same issue…

Maybe somebody from ionic team can say a few words?

And i won’t manipulate ionic view states…

Thanks and greets,


Sorry but i have to say:

There is an issue opened on github about it:

Hi again, after some interesting reading of the ionic code, specifically the $ionicViewService

I found this solution, replace the currentView with the backView, that it’s exactly location replace does:

$rootScope.$viewHistory.currentView = $rootScope.$viewHistory.backView; $state.go('bla');

I know that service very well, but this is an undocumented part, because you can break many things with that.
So ionic should respect this issue by default ;).

That’s the ideal scenario, but while this happens it’s a good workaround. I’m using it and works perfectly.

This doesn’t work in 1.0.0 correctly, here’s a fix I’m trying to get in