ember-query-params icon indicating copy to clipboard operation
ember-query-params copied to clipboard

dynamic linkTo supported in handlebars?

Open toranb opened this issue 11 years ago • 1 comments

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 :)

toranb avatar Aug 05 '13 19:08 toranb

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 :).

ElteHupkes avatar Aug 10 '13 16:08 ElteHupkes