JSFiddle - React, Tailwind, and code Playground
by Douglas Duhaime
HTML
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"></script>
<div ng-app="myApp">
<select
data-ng-model="what"
data-ng-options="option.label for option in options"
data-ng-change="setDropdownOption()"
data-ng-init="what = what || dropdownOptions[0]">
</select>
</div>
JavaScript
var app = angular.module("myApp", []);
app.controller("wow", ["$scope",
function($scope) {
$scope.options = [
{label: "hey", id: 0},
{label: "hello", id: 1},
]
}
]);