Skip to content

Instantly share code, notes, and snippets.

@patrickmaciel
Last active January 7, 2016 20:22
Show Gist options
  • Save patrickmaciel/484f6535ad9dd0fa7c99 to your computer and use it in GitHub Desktop.
Save patrickmaciel/484f6535ad9dd0fa7c99 to your computer and use it in GitHub Desktop.
AngularJS ng-options for html select element
<select
name="customer_id"
id="customer_id"
class="text"
ng-model='filtro.estado'
ng-click="selectItem('estado', filtro.estado, $event)"
ng-options="estado as estado for estado in listas.estados">
<option value="">Selecione</option>
</select>
<select
name="customer_id2"
id="customer_id2"
class="text"
ng-model='filtro.estado2'
ng-click="selectItem('estado', filtro.estado2, $event)"
ng-options="v as v for (k,v) in listas.estados">
<option value="">Selecione</option>
</select>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment