Pass icon and name in ng-options

Asked

Viewed 33 times

0

If anyone can help me, but I appreciate it! This is my code:

$scope.Moedas =[
          { id: 0, nome: "REAL", icon:"fas fa-dollar-sign" ,ativo: false },
          { id: 1, nome: "DOLAR", icon: "fas fa-dollar-sign", ativo: false },
          { id: 2, nome: "EURO", icon: "fas fa-euro-sign", ativo: false }      
        ];

<div class="form-group col-xs-6">
    <select class="" ng-model="Produto.moeda" ng-options="o.nome as o.nome | translate for o in Moedas" ng-enter="">
        <option value="" disabled>{{'SELECIONE_MOEDA' | translate}}</option>
    </select>
</div>
  • In case you want to use the items from Modeas as select options?

  • This I have the items in the options I want to put the icon and the name next.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.