Skip to content

bug: $ionicHistory should respect $state.go location: 'replace' option #4109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
artlogic opened this issue Jul 19, 2015 · 5 comments
Closed

Comments

@artlogic
Copy link

Type: bug

Platform: all

When moving from view to view using $state.go, it's possible to add a option to replace the current location with the location we're going to, rather that putting it on the history stack. For example:

$state.go('app.logout', null, {location: 'replace'});

Ideally, if this option is passed to $state.go, $ionicHistory should replace as well. As it stands today, it simply pushes the last address onto the stack.

@artlogic artlogic changed the title bug: $ionicHistory should respect $state.go location: 'replace' option bug: bug: $ionicHistory should respect $state.go location: 'replace' option Jul 19, 2015
@artlogic artlogic changed the title bug: bug: $ionicHistory should respect $state.go location: 'replace' option bug: $ionicHistory should respect $state.go location: 'replace' option Jul 19, 2015
@Ionitron
Copy link
Collaborator

Greetings @artlogic!

I've closed this issue because my sensors indicated it was old and inactive, and may have already been fixed in recent versions of Ionic. However, if you are still experiencing this issue, please feel free to reopen this issue by creating a new one, and include any examples and other necessary information, so that we can look into it further.

Thank you for allowing me to assist you.

@zenkalia
Copy link

this is still an issue 😿 👍 😿

@artlogic
Copy link
Author

@zenkalia - I wasn't able to verify it was still an issue (I found an alternate solution) after the ticket was auto-closed. I'd love to see this get fixed. If you could submit a new issue (as suggested above), I would appreciate it. Maybe it'll get someone's attention this time around.

@zenkalia
Copy link

i might just do that if i haven't solved this tomorrow...

what alternative solution did you use? this one?:
#1287 (comment)

i'm using a side menu and am having trouble pulling in $ionicHistory to
use that hack. :\

On Mon, Dec 14, 2015 at 7:05 PM, James Kruth [email protected]
wrote:

@zenkalia https://github.com/zenkalia - I wasn't able to verify it was
still an issue (I found an alternate solution) after the ticket was
auto-closed. I'd love to see this get fixed. If you could submit a new
issue (as suggested above), I would appreciate it. Maybe it'll get
someone's attention this time around.


Reply to this email directly or view it on GitHub
#4109 (comment).

@artlogic
Copy link
Author

In my particular case, I was able to get away with simply blowing away all history:

$ionicHistory.nextViewOptions({ historyRoot: true });

I'm surprised you aren't able to inject $ionicHistory. Is there a circular dependency problem?

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants