Is it possible to use link-to
with dynamic context params as a single variable?
This works when there is 1 dynamic part, but in the example below i have post-category-id
and post-id
. Is it possible to pass these params in dynamically. It tried to pass them as array or as a String, but this is not working.
In the example I want to {{#link-to "post" params}}
where post is nested in post-category
. My goal is to pass in params with the 2 context params needed.
// router
this.resource('post-categories', {path: 'post-categories/:post-category-id'}, function() {
this.resource('post', {path: 'post/:post-id'})
});
// controller
...
params: Em.computed(function() {
return [1, 4]
})
...
// template
{{#link-to "post" params}}
I tried to read in the source, but that didn’t help too much.