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

Are dynamic-params branch features available elsewhere? #2608

Closed
websirnik opened this issue Mar 7, 2016 · 4 comments
Closed

Are dynamic-params branch features available elsewhere? #2608

websirnik opened this issue Mar 7, 2016 · 4 comments

Comments

@websirnik
Copy link

I've been using dynamic-params branch(now deleted) for a long time, and it was working great for my use case. Looks like, it's time to upgrade, wondering if this functionality is available anywhere?

.state('post.item', {
    url: '/:item_slug',
    params: {
        item_slug: {
            value: null,
            dynamic: true
            // This prevented the controller re-load after the route change 
            // Does anything like this is available in 2.18.0 or 1.0.0alpha?
        },
        post_slug: {
           value: null,
           dynamic: false
        }
    }
}
@websirnik websirnik changed the title Does dynamic-params branch features are available? Do dynamic-params branch features are available? Mar 7, 2016
@websirnik websirnik changed the title Do dynamic-params branch features are available? Are dynamic-params branch features available elsewhere? Mar 7, 2016
@christopherthielen
Copy link
Contributor

dynamic params will be in 1.0.0-alpha.1

@duncanmcdowell
Copy link

@christopherthielen will you be able to provide (basic) documentation on dynamic params when 1.0.0-alpha.1 is released?

@burzum
Copy link

burzum commented Mar 10, 2016

Is there any way to make this work with 0.2.x? I'm messing around with this now for nearly three days. My goal is to make search filters persistent. I'm storing my query params in a cookie and read them from there and set them view $location.search(). I call my service that does that in the resolve. This works when I enter the page and it sets the params.

When I go to another page the state changes, then I go back to my page where I want the filters to be applied they're gone. I really can't figure out a way to keep them there... It's a pain that there seems to be no sane way to simply merge optional query params or stored query params to the state that is being executed. Any ideas how to resolve this?

@christopherthielen
Copy link
Contributor

@burzum Dynamic params are different than what you describe. Dynamic params are parameters that can change without their state being entered again. When a normal param changes, the state is exited and re-entered.

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

4 participants