Skip to content
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

search parameters - prevent reload if going to a child state #1967

Closed
hmdhk opened this issue May 20, 2015 · 5 comments
Closed

search parameters - prevent reload if going to a child state #1967

hmdhk opened this issue May 20, 2015 · 5 comments

Comments

@hmdhk
Copy link

hmdhk commented May 20, 2015

I have a parameter in parent state that shouldn't cause reload for the parent state if i'm going to any of its child states. (child states should be reloaded)

@eddiemonge
Copy link
Contributor

Have you tried version 0.2.15 with reloadOnSearch: false ? Or do you mean you want a child state to reload with the search params change but not the parent? If so, you might want to define the param on the child as well.

@hmdhk
Copy link
Author

hmdhk commented May 20, 2015

yes i have tried reloadOnSearch, it only works if I'm transitioning to the
same exact state, only with different parameters,
what i want is the ability to transition to a child state with different
parameter, without the parent state being reloaded.
i needed to define the parameter in the parent state because that parameter is common among all child state and it defines how they should behave. for example i may want to transition to a sibling state and i need that parameter to be the same and the parent state does not reload.

On Wed, May 20, 2015 at 8:51 PM Eddie Monge notifications@github.com
wrote:

Have you tried version 0.2.15 with reloadOnSearch: false ?


Reply to this email directly or view it on GitHub
#1967 (comment)
.

@eddiemonge
Copy link
Contributor

You could pass the param you want to the sibling: $state.go('parent.sibling', {paramName: $stateParams.paramName}

@hmdhk
Copy link
Author

hmdhk commented May 23, 2015

i could pass the parameter around but since that parameter is part of application's state that should be the same across all child states, it would be more convenient to define it once in the parent state and every child state would have access to it.

is this something you would consider adding in the future (like an option in parameter definition)?

@christopherthielen
Copy link
Contributor

this won't work until dynamic params are implemented, sorry. coming in 1.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants