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

Adjust query params param order #3383

Merged
merged 1 commit into from
Sep 11, 2013

Conversation

alexspeller
Copy link
Contributor

This is what was discussed with @wycats on twitter and IRC. The summary is:

If your route has query params specified:

App.IndexRoute = Ember.Route.extend({
    beforeModel:      function( queryParams, transition ) {},
    model:            function( params, queryParams, transition ) {},
    afterModel:       function( resolvedModel, queryParams, transition ) {}
});

If your route does not have query params specified:

App.IndexRoute = Ember.Route.extend({
    beforeModel:      function( transition ) {},
    model:            function( params, transition ) {},
    afterModel:       function( resolvedModel, transition ) {}
});

This is backwards compatible, a better long term api, and needs no flag setting.

This PR really just updates the tests. The meat of this is in tildeio/router.js#50 (the updated router.js is included here).

@wagenet
Copy link
Member

wagenet commented Sep 11, 2013

@alexspeller We didn't do this for your first commit, but can you prefix your commit with [FEATURE query-params]? Thanks!

@alexspeller
Copy link
Contributor Author

@wagenet done

wycats added a commit that referenced this pull request Sep 11, 2013
@wycats wycats merged commit 8686df4 into emberjs:master Sep 11, 2013
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

Successfully merging this pull request may close these issues.

3 participants