Reputation: 962
We can add partials onto templates in ember js.
{{#each subdetail in leftSubDetails}}
{{partial 'lists/details/link-'+subdetail}}
{{/each}}
Gives following error
Error: Parse error on line 22:
...lists/details/link-'+subdetail}}
-----------------------^
Expecting 'CLOSE', 'CLOSE_UNESCAPED', 'STRING', 'INTEGER', 'BOOLEAN', 'OPEN_SEXPR', 'CLOSE_SEXPR', 'ID', 'DATA', got 'INVALID'
Upvotes: 0
Views: 293
Reputation:
Compute the name of the partial as in the view or controller:
partialName: function() {
return 'lists/details/link/ + this.get('subdetail');
}.property('subdetail')
Then call it like
{{partial partialName}}
Not tested.
Upvotes: 3
Reputation: 1037
Try passing a parameter instead, like this:
{{partial 'lists/details/link' subdetail=blah}}
Upvotes: 0