Type Number in option html

0

I need to set an option to number (just like in input type="number"). Because I need the final form (ReactiveForms type) to be sent a number for that value and not a string. I have tried to transform in many ways, but none of them right.

Here I need to get a number type of value, not a string:

<div class="col-md-6" *ngIf="ufSelecionado">
                            <select formControlName="cidade" class="form-control m-b-5" [ngClass]="validacaoClass(endereco.controls.cidade)">
                                <option *ngFor="let cidade of cidades" [value]="cidade.codCidad" selected>{{cidade.nome}}</option>
                            </select>
                        </div>
    
asked by anonymous 19.11.2018 / 19:12

0 answers