Skip to content

Modify URL without state reload #3470

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
inad9300 opened this issue Jun 14, 2017 · 10 comments
Closed

Modify URL without state reload #3470

inad9300 opened this issue Jun 14, 2017 · 10 comments
Labels

Comments

@inad9300
Copy link

inad9300 commented Jun 14, 2017

This is a feature request.

reloadOnSearch is deprecated. Now we are supposed to use "dynamic parameters" -- a much more obscure name than "reload on search". The reasons for this change are beyond my understanding, but both approaches are too rigid.

Once you say "do not reload x state if a parameter changes", you are completely restricted on what you can do. No doubt you will at some point need to add a new parameter for which you do want to reload the state if it changes.

Once you say "do not reload whatever state if x parameter changes", you are equally restricted. No doubt you will sooner or later want to both, in different circumstances, navigate to the state with new parameters, and simply synchronize some internal state with the URL.

So, in my opinion, the ideal approach would be to allow controlling the reload on a per-call basis, i.e. via a parameter on the go() function.

If you find the time to implement such a feature, I would be very grateful.

@ventralnet
Copy link

This would be useful as well if you are in the situation where you want a parameter to be dynamic for one child state, yet non dynamic for other sibling states

@sarod
Copy link

sarod commented Jun 22, 2017

Looks like a duplicate of #2679

@inad9300
Copy link
Author

inad9300 commented Jun 22, 2017

It might well be, although they refer to very specific use cases and start to bring weird terms, such as "dynamic parameters" and "sticky states". The need is to modify the URL, it cannot be simpler. Anyways, focusing on the original message, @orangesoup's problem could definitely be solved with an extra parameter in the go() function, as it was (kind of) possible with the old UI Router.

Feel free to close this issue in favour of #2679, but please, don't overcomplicate things!

@ventralnet
Copy link

Is there a way to use one of the transition service hooks to stop a state transition but still perform the URL updating?

@inad9300
Copy link
Author

That is an interesting idea, but still overcomplicated in my view. I'm not sure if it is even possible, though.

@inad9300
Copy link
Author

inad9300 commented Jul 4, 2017

Any news on this (or #2679)?

By stopping to use the deprecated reloadOnSearch() I start to see duplicated requests all around my application. Using dynamic parameters is not convenient at all for me either -- not because of the reasons I exposed at first, which I believe are enough on themselves, but also because all my states are defined with your syntax ?{paramName:paramPattern}, which does not support specifying the parameters as dynamic, and changing this everywhere is too much work. It's turning into a maintenance nightmare.

@inad9300
Copy link
Author

inad9300 commented Dec 13, 2017

Sorry for being so insistent, but are there any updates on this...? Are you planning on implementing a feature like this?

@inad9300
Copy link
Author

Pop.

@MartijnWelker
Copy link

@inad9300 @ventralnet I might have created a solution that fits your needs over in #3047

@stale
Copy link

stale bot commented Jan 24, 2020

This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs.

This does not mean that the issue is invalid. Valid issues
may be reopened.

Thank you for your contributions.

@stale stale bot added the stale label Jan 24, 2020
@stale stale bot closed this as completed Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants