JSFiddle - React, Tailwind, and code Playground
by Kunal Paul
HTML
<div ng-app="demoApp" ng-controller="mainController">
<select ng-options="f.value as f.label for f in fruit" ng-model="selectedFruit"></select>
<pre>
select: {{selectedFruit}}
</pre>
</div>
JavaScript
angular.module('demoApp', [])
.controller('mainController', MainController);
function MainController($scope) {
//Data Model
$scope.fruit = [
{ label: "Apples", value: 4, id: 2 },
{ label: "Oranges", value: 2, id: 1 },
{ label: "Limes", value: 4, id: 4 },
{ label: "Lemons", value: 5, id: 3 }
];
}