Skip to content

Instantly share code, notes, and snippets.

@nicolae-olariu
Last active August 29, 2015 14:17
Show Gist options
  • Save nicolae-olariu/1921fa98b5cda70e6126 to your computer and use it in GitHub Desktop.
Save nicolae-olariu/1921fa98b5cda70e6126 to your computer and use it in GitHub Desktop.
Dynamic dropdown rendered using AngularJS and select2 jquery plugin
<select
id="sampleId"
class="select2"
data-allow-clear="true"
data-placeholder="placeholderHere"
ng-model="sampleModel"
ng-options="entity.modelHere as entity.modelHere for entity in entities"
ng-selected="sampleModel == entity.modelHere">
</select>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment