Last active

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Ember Query Param API examples

How can I send the query-params to the server?

If you are using Ember Data, you can do this with the filter() method. The filter method returns an array that will auto-update as other entries are found. http://emberjs.com/guides/models/frequently-asked-questions/

Owner

@oxodesign just added an example http://jsbin.com/ucanam/2942

@machty is there a way to pass query-params a context, instead of the current controller?

This looks pretty great at first glance! Has any consideration been made for something like Matrix URLs to remove the requirement for sticking everything after the query string, even when it may semantically belong elsewhere?

This would allow a URL to look like:

#/magazines;publisher=machty;audience=moviegoers/issues

Instead of:

#/magazines/issues?magazines[publisher]=machty&magazines[audience]=moviegoers
Owner

@kamal i'm not sure what you mean, seems like the answer's definitely yes though {{link-to (query-params anythingYouWant)}}

@machty this works for a route like this ?
/letters?occup=Primary&state=NY&propertyRef=55
Primary, NY and 55 are some values from a Fixture Model
The route above is suppose to change when you click on a link

Thanks!

Are there any examples of using query params with an Ember.Select view?

Is it possible to pass an entire object to the queryParams?

For example:

queryParams: ['filters'],
filters: {
  name: 'Ivan',
  age: 666
}

In the address bar, in theory, it should look like this: ```?filters[name]=ivan&filters[age]=666
But how to do it?

Tried your Gist - https://gist.github.com/machty/7923797 - but in Ember 1.7.0 this don't work :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.