Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

$ionicHistory pop history?

$
0
0

@ericis wrote:

Is there a way to pop a view off of the history stack without clearing the entire stack?

I've been reading about $ionicHistory, the AngularUI $state, and all of the ways to manipulate the back button, including how to go back multiple views like using goBack(-2).

I want the default behavior of the back button without overriding it.

I have the following flow:

  1. View1 ->

  2. View2 (back button to View1) ->

  3. View3 (back button to View2)

    *View3 uses `$state.go('View2', { ... }) to pass information back to View2

  4. View2 (back button to View3)

    *This is undesirable. I want the back button to View1.

    I'd like to use something like: `if ($stateParams.argFromView3) { $ionicHistory.pop(1); ... do stuff with params ... }

    If View2 were to properly show a back button to View1, then, if clicked, I would want View1 to show a back button back to View2. In other words, I want to selectively ignore views from registering in history or the ability to pop() them myself somehow.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>