Can same state be added to history twice with different scope


#1

Basically I have an “Options” page which has lets say 30 items.

When I click on one of these, this results in a different set of option.

And then when I click on the second List I would go to a results page.

Option 1 - state options
   Option 1.1 - state options
         Result - state result

On my result page I would like to be able to click back to go to state with the last options (which works) but then be able to click back again and go to original options.

The last part doesn’t work since I then go to home page.

I can see why because in the history stack my options state doesnt get added twice but only once.

Is there anyway I can force the state to go into history stack twice ?

I tried like adding random parameters etc if it would help but no joy, this is how I currently go from state option -> state option.

$state.transitionTo('home.options', { updated : addressOptions.length}, {
                    reload: true,
                    inherit: false,
                    notify: true
                  });

#2

Hello @stevenfitzpatrick, did you get a solution to this? I require the same feature


#3

Yeah I added a parameter to state.go with unique value i.e. date time


#4

Thanks man! Worked like a charm


#5

:cookie: :cookie: :cookie: Man, you deserve sooo much cookie for this answer! :cookie: :cookie: :cookie:
How could I not think of this… This issue has been haunting me for months.