Several fields of inputs are changed the value in an imput and I was capia a ttodos

0

I'm making a shopping cart in ionic and when I show the cart window with the product detail that the user selected, I have a input % field type=number

<input 
    type="numer" 
    value="{{ item.count }}" 
    min="1" 
    max="{{ item.existencia }}" 
    name="{{ item.product_id }}_cant" 
    (keypress)="onlyNumberKey($event)"
    [(ngModel)]="cantidadItems.cantidad"
    id="cant_producto{{ item.product_id }}"
    (change)="cambiacantidad(this.item)"
/>

but changing the amount of this field is changed in all inputs , because I am given this error if the name is different for each one.

    
asked by Andres Condo 23.10.2018 в 16:47
source

0 answers