What I want to achieve: create controller with view, and in this view I have list of \'Gallery\' objects. Each item has it\'s own view and controller.
All files are her
I suggest you to use an Ember.CollectionView.
Your galleriesIndex
template will looks like:
{{view App.GalleriesListView contentBinding="this"}}
The view:
App.GalleriesListView = Ember.CollectionView.extend({
classNameBindings: [':thumbnail', ':thumbnails-list'],
itemViewClass: Ember.View.extend({
templateName: "galleriesListItem",
hover: false,
mouseEnter: function() { this.set('hover', true); },
mouseLeave: function() { this.set('hover', false; }
})
});
The galleriesListItem
template:
-
I am not sure there is no error in my code, I just copy-paste and write how it should looks like.
Concerning the TODO
you saw, this is because the Ember.CollectionView
actually needs all the ember-handlebars
module instead of just the file it needs, you should not care about that.