-
Notifications
You must be signed in to change notification settings - Fork 3k
Suppressing the reloading/recreation of controllers and views upon query string parameter changes #1038
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
Comments
@nateabele, has your dynamic-params branch been merged into master yet? If not, do you know when that'll happen? |
nateabele
added a commit
to nateabele/ui-router
that referenced
this issue
Aug 22, 2014
`$stateParams` is now a service with an `$observe()` method to watch parameters on dynamic state parameters. Dynamic state parameters can be declared like so: `params: { foo: { dynamic: true } }`. Closes angular-ui#1037, angular-ui#1038, angular-ui#64
nateabele
added a commit
to nateabele/ui-router
that referenced
this issue
Sep 9, 2014
`$stateParams` is now a service with an `$observe()` method to watch parameters on dynamic state parameters. Dynamic state parameters can be declared like so: `params: { foo: { dynamic: true } }`. Closes angular-ui#1037, angular-ui#1038, angular-ui#64
gGonz
pushed a commit
to gGonz/ui-router
that referenced
this issue
Mar 13, 2015
`$stateParams` is now a service with an `$observe()` method to watch parameters on dynamic state parameters. Dynamic state parameters can be declared like so: `params: { foo: { dynamic: true } }`. Closes angular-ui#1037, angular-ui#1038, angular-ui#64
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The reloading and recreation of the controllers and views when modifying search parameters prohibits any smooth UI as the DOM as well as scopes are discarded. The current 'reloadOnSearch' stops the transition, however it fails to update the $location.search(), more importantly, it fails to reflect the changes to the $stateParams which applications rely on for reactive code ($watch).
The goal is to be able to perform UI animations, react to $stateParams changes and maintain state in the url. I've created a pull requests #1037 and would love your feedback.
I've tried to avoid breaking existing functionality and resorted to creating two new configuration variables.
The configuration of 'reloadOnPath' and/or 'reloadOnQuery' being set to 'false' will update the url, update the $stateParams and suppress the reloading of the controllers and views. One can specify the same configurations when using $state.transitionTo() as well as other wrappers around it ($state.go()).
The text was updated successfully, but these errors were encountered: