I have range with currentValue displayed in span. I'm trying to import this value to compute function, make a calculation and return back. I stacked in compute.
range.hbs
<input
type="range"
onchange=
class="form-control"
value=""
min="1"
max="99"
/>
<span class="tag tag-pill tag-info">
% - %
</span>
range.js
export default FormComponent.extend({
deltaValue: computed('currentValue', function() {
var newValue = 100 - this.get('currentValue');
return newValue;
})
});
Aucun commentaire:
Enregistrer un commentaire