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, iffalse
not. if string, must"replace"
, update url , replace last history record.
Comments
Post a Comment