0
I have a field that I need that as I type values, it adds in a variable.
I tried something like:
<input (keyup)="somaEstoque($event)" #inputestoque type="text" name="estoque_variacao{{i}}" class="form-control" id="estoque_variacao{{i}}" formControlName="estoque_variacao">
somaEstoque(valor){
this.produto.estoque = this.produto.estoque + toFloat(valor.target.value);
}
My target to be added is a formgroup that may own "N" stock inputs:
<div class="col-12 col-md-2">
<div class="md-form form-lg input-modal">
<input mask="000000000000" (keyup)="somaEstoque($event)" #inputestoque type="text" name="estoque_variacao{{i}}" class="form-control" id="estoque_variacao{{i}}" formControlName="estoque_variacao">
<label [class.active]="inputestoque.value != ''" for="estoque_variacao{{i}}">Estoque</label>
</div>
</div>
I believe that logic is a little more complex, and also has to deal with when the user deletes the value.
Someone’s done it at the angle?