Skip to content

Instantly share code, notes, and snippets.

@nickcherry
Last active April 26, 2017 00:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nickcherry/27f0862beefacbcdc4c2 to your computer and use it in GitHub Desktop.
Save nickcherry/27f0862beefacbcdc4c2 to your computer and use it in GitHub Desktop.
custom-angular-select (array of strings)
angular.module 'angular-custom-select-examples', ['angular-custom-select']
.controller 'ExamplesController', ($scope) ->
$scope.selectedValues = {}
$scope.strings = ['Option A', 'Option B', 'Option C', 'Option D', 'Option E']
custom-select
ng-model="selectedValues.string"
ng-options="string for string in strings"
placeholder="Select one of these string values...">
</custom-select>
<div class="selected-value">
Selected Value: {{ selectedValues.string || 'N/A' }}
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment