Dismiss
Announcing Stack Overflow Documentation

We started with Q&A. Technical documentation is next, and we need your help.

Whether you're a beginner or an experienced developer, you can contribute.

Sign up and start helping → Learn more about Documentation →

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

share|improve this question

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.