Hi,
I would like to enter the first option as the default, but doing it this way does not work.
What can I do?
<select ng-model="newSpesaAereo.metodoPagamento">
<option selected="selected">Carta di credito</option>
<option>Bancomat</option>
<option>Contanti</option>
<option>Altro</option>
</select>
@Hacksoldier sorry if it’s too late, but perhaps try setting $scope.newSpesaAereo.metodoPagamento = 'Carta di credito'
in your controller. You might also look into ng-init
as an option. I wish I could be more definitive, but I’m struggling with something similar.
Hi Hacksoldier,
I also want to know how to do it and found the solution here.
Just change selected=“selected” to
ng-selected=“true”
and bamm 