Reputation: 1444
I have a view that has a list of items that I'm iterating over in a template, and rendering that view inside of it as a list item of a . If I use the global name for the template, it works just fine, but I don't want to define that template globally, I want to define it on the current view as a child view. If I reference it outside of the {{#each}} block, it works, but not inside. Is there any way to do this?
{{#each items}}
{{#view Em.App.RecentItemView contentBinding="this"}}
<a href="#">{{content.Title}}</a>
{{/view}}
{{/each}}
The view in context also has an itemView: Em.View.extend({}) on it that I would rather use.
Upvotes: 2
Views: 379