8

Does anyone know how to change the url in Angular UI-Router without rendering or changing the state?

0

1 Answer 1

8
+50

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.