ember-query-params
ember-query-params copied to clipboard
dynamic linkTo supported in handlebars?
Does this currently support something like this in the template itself
{{#linkTo route sortBy="username"}}some link{{/linkTo}}
If not -does it support any handlebars linkTo helper syntax or must I declare this 100% js side right now? If it's not handlebars friendly what part of your library should I look at to bolt this on myself as it's a requirement of my current project?
thanks again -awesome add-on for ember :)
Doing it in plain-handlebars is currently not possible, you have to create a QueryParameters
object in your controller to pass as a context. Extending LinkView
to support something like this shouldn't be too hard I think, I guess the main problem is syntax - when passing key=value
pairs to the linkTo
helper it becomes unclear which are meant for the LinkView
and which are query parameters. We'd need some king of naming convention to identify query parameters (postfixing a query param with Query
for example). I'm open to suggestions :).