I'm trying to set the class of my itemViewClass view based on an attribute of the value's content.
The code below produces:
<span id="ember326" class="ember-view spanValue">
<h5>
<script id="metamorph-32-start" type="text/x-placeholder">
Select
<script id="metamorph-32-end" type="text/x-placeholder">
</h5>
</span>
class is set to 'spanValue' instead of the value from the content.
Any ideas?
thanks.
listHeaderView: Ember.CollectionView.create({
classNames: ['jobs-list-header', 'row'],
content: [
Ember.Object.create({
span: 'span1',
label: 'Select'
}),
Ember.Object.create({
span: 'span1',
label: 'Status'
}),
Ember.Object.create({
span: 'span1',
label: 'Tax Year'
}),
Ember.Object.create({
span: 'span3',
label: 'Municipality'
}),
Ember.Object.create({
span: 'span3',
label: 'School District'
}),
Ember.Object.create({
span: 'span1',
label: 'Received'
})
],
itemViewClass: Ember.View.extend({
tagName: 'span',
classNames: ['spanValue'],
spanValue: function() {
return this.get('content').span
}.property(),
template: Ember.Handlebars.compile('<h5>{{content.label}}</h5>')
})
}),