I have a field that I need as I type values, it will add up to 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 can have "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 think logic is a bit more complex, and it also has to deal when the user deletes the value.
Has anyone done this in the angle?