Does anyone know how to change the url in Angular UI-Router without rendering or changing the state?
You can change the URL without changing the state by using:
$location.path("your/path/123").replace()
Or:
$state.go("my.state", {location: true, notify: false, reload: false})
Source: https://github.com/angular-ui/ui-router/issues/64 (last few answers)
General: After creating the model and receiving the id, store it in local storage. Then if user visits later or reloads, just check which id he edited last and change the state. You can offer the user to start from scratch by just deleting the local Storage key and reload.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With