Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

[FEATURE query-params-new] Hopefully final iteration #4468

Merged
merged 1 commit into from

5 participants

@machty
Owner
  • default value'd QPs no longer show up in URL
  • default value's type is used to determine how deserialized QPs are cast into controller prop values
  • added queryParams Route config hash with properties replace and refreshModel to configure changed QP property behavior
  • better code organization

/w @raytiley's help

Updating examples from the QP guide

@machty machty referenced this pull request from a commit in machty/website
@machty machty Update Query Params guide to latest API iteration
See here for details, (don't don't merge this 
until that is merged):

emberjs/ember.js#4468
4228f1f
@machty machty referenced this pull request in emberjs/website
Merged

Update Query Params guide to latest API iteration #1336

@machty machty [FEATURE query-params-new] Hopefully final iteration
- default value'd QPs no longer show up in URL
- default value's type is used to determine how
  deserialized QPs are cast into controller prop values
- added queryParams Route config hash with properties
  `replace` and `refreshModel` to configure changed
  QP property behavior
- better code organization

/w @raytiley's help
242af21
@machty machty merged commit 746adc2 into emberjs:master

1 check passed

Details default The Travis CI build passed
@kiwiupover

Thanks for all the hard work here I really like the new api.

How should we remove a query-param from the request. I believe in the past ember would remove the param if it was set to something falsie. What is the plan going forward.

Cheers

@raytiley

@kiwiupover I could totally be wrong, but I think the plan is to not serialize default values into the URL. So if you have:

App.MyController = Ember.ObjectController.extend({
  queryParams: ['search', 'sort'],
  search: null,
  sort: 'ascending'
});

You could get the items to go away by setting them to to default values.

{{link-to 'My Link' 'my' (query-params search=null sort='ascending') }}
@beerlington

@kiwiupover @raytiley not that it answers your question, but I think this issue is related to clearing the query-params #4447

@matthooks

@matchy just wanted to make sure you saw #4494.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 10, 2014
  1. @machty

    [FEATURE query-params-new] Hopefully final iteration

    machty authored
    - default value'd QPs no longer show up in URL
    - default value's type is used to determine how
      deserialized QPs are cast into controller prop values
    - added queryParams Route config hash with properties
      `replace` and `refreshModel` to configure changed
      QP property behavior
    - better code organization
    
    /w @raytiley's help
Something went wrong with that request. Please try again.