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

dynamic linkTo supported in handlebars? #5

Open
toranb opened this issue Aug 5, 2013 · 1 comment
Open

dynamic linkTo supported in handlebars? #5

toranb opened this issue Aug 5, 2013 · 1 comment

Comments

@toranb
Copy link

toranb commented Aug 5, 2013

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

@ElteHupkes
Copy link
Owner

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

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

No branches or pull requests

2 participants