manni
manni

Reputation: 717

ember.containerview defined like regular view?

can you define a containerview like this and have it work as a regular view? because it is not working for me. but when i switch to just a regular Ember.View.extend(), the title and description renders.

App.SectionView = Ember.ContainerView.extend({ tagName: 'li', classNames: ['section'], defaultTemplate: Ember.Handlebars.compile(sectionTemplate), titleBinding: 'content.title', descriptionBinding: 'content.description' });

does containerView not work with template? thanks.

Upvotes: 1

Views: 500

Answers (1)

Christopher Swasey
Christopher Swasey

Reputation: 10552

ContainerView overrides #render, so it doesn't work with templates. So, what you should do is have App.SectionView be an Ember.View, display your title and description there, and have the ContainerView be a subview.

Upvotes: 1

Related Questions