angularjs - Changing state without changing browser history in angular ui-router -


assume have logic this:

  • from state a, change state b.
  • whenever arrive state b, app redirect state c calling $state.go(statec)
  • now in state c

my question how go state state c (given fact state can state don't know @ run-time, meaning user can access state b other states)

use location option value "replace"...

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

see https://angular-ui.github.io/ui-router/site/#/api/ui.router.state.$state#methods_go

location - {boolean=true|string=} - if true update url in location bar, if false not. if string, must "replace", update url , replace last history record.


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -