Level 7
if you want to bind a data value to the attribute you should use v-bind: or the shorthand :
<input v-bind:value="someData" :type="someType" />
1 like
Hello guys , I have a Input like this one -
<input min=1 max=4 v-model.number="qty" type="number" >
It is setting the min value and the max value . ti is working but . If I try to make the max value dynamic like this one -
<input min=1 max=max_qty v-model.number="qty" type="number" >
It will not work , I tryed as well like this -
<input min=1 max="max_qty" v-model.number="qty" type="number" >
<input min=1 max="parseInt(max_qty)" v-model.number="qty" type="number" >
The code is here -
http://jsbin.com/genivag/edit?html,css,js,console,output
Thanks
if you want to bind a data value to the attribute you should use v-bind: or the shorthand :
<input v-bind:value="someData" :type="someType" />
Please or to participate in this conversation.