Reputation: 1234
I want to pass queryparams and anchor element name in the link-to. like this
localhost.domain.com?get=100&interviewId=11#4
I used query params to construct get=100&interview=11 , something like this
{{#link-to 'domain.url' (query-params get=100 interviewId=11)class="btn btn-info"}}
Link
{{/link-to}}
How to generate the link with anchor using ember link-to ?
Note: Need solution with link-to only, <a href="">
is not needed
Upvotes: 2
Views: 258
Reputation: 12872
Install ember-href-to addon,
ember install ember-href-to
You can use href-to helper to generate URL by providing queryParams and routeName.
(concat (href-to 'domain.url' (query-params get=100 interviewId=4)) propName)
Upvotes: 2