Rene Rene - 1 year ago 133
jQuery Question

Angular JS populate Select Bootstrap

I have the following array

$scope.profissionais = {}

I have the following array

[{"usuario":"14","username":"Renê Lima"},{"usuario":"16","username":"Thaís"}]

I'm trying populates it with the following code

<option ng:repeat="prof in profissionais" value="{{prof.usuario}}">

However it did not work but also not give any error, akguem help me? TKS

Answer Source

ng:repeat to ng-repeat :)

$scope.singleSelect = null
$scope.profissionais = [
  {usuario:"14",username:"Renê Lima"},    

<select ng-model="singleSelect">
  <option ng-repeat="prof in profissionais" ng-value="prof.usuario">{{prof.username}}</option>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download