I want my ember view displaying the result of the total calculation in an input in order to get the value binding of the result.
Everything works fine a part from that i can not get the result inside my Input number
This is my view
App.TotalView = Ember.View.extend({
tagName: 'input',
templateName:"total",
attributeBindings: ['value', 'placeholder'],
placeholder: null,
value: '',
total: (function() {
var res= parseInt(this.get('controller.newThread.selectContentTariffa')) * parseInt(this.get('controller.newThread.primary'));
return isNaN(res)?"":res;
}).property('controller.newThread.selectContentTariffa', 'controller.newThread.primary')
});
This is my html
<script type="text/x-handlebars" data-template-name="total">
{{view.total}}
</script>
Why the result is displayed out of the input?
I have reproduced the issue here: http://emberjs.jsbin.com/piqihi/edit?html,js