I try to compute the view width each time the model is modified.
The template is calling the view.labelStyle computed property binded to the model
I get the following error:
Uncaught TypeError: Cannot read property 'defaultView' of undefined
I think my error is due to the $(this).outerWidth() call... but I do not know what it the correct way to call the JQuery method outerWidth() on the Ember view...
Ember.Handlebars.compile('<div class="secondary-field-label" {{bindAttr style="view.labelStyle"}}>
labelStyle: function() {
var width=$(this).outerWidth());
return 'width:' + width + 'px';
}.property('content.label', 'content.value'),