JSFiddle - React, Tailwind, and code Playground
by awolf2904
HTML
<div ng-app="demoApp" ng-controller="mainController">
<select ng-model="selectedFruit">
<option ng-repeat="curFruit in fruit" value="{{curFruit}}">{{curFruit.label}}</option>
</select>
<select ng-model="selectedFruitNgOptions" ng-options="curFruit as curFruit.label for curFruit in fruit">
</select>
<pre>
ng-repeat select: {{selectedFruit}}
ng-options select: {{selectedFruitNgOptions}}
</pre>
</div>
JavaScript
angular.module('demoApp', [])
.controller('mainController', MainController);
function MainController($scope) {
$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 }
];
}