JSFiddle - React, Tailwind, and code Playground

by rpaul

HTML

<script src="http://code.angularjs.org/1.1.5/angular.js"></script>
<body ng-app ng-controller="AppCtrl">
<select ng-model="selectedFruit" ng-options="fruit.value as fruit.displayName for fruit in fruits">
</select>
   Selected value is  {{selectedFruit}}
</body>

JavaScript

function AppCtrl($scope) {  
    
    $scope.fruits = [
        {value: '1', displayName: 'Apple'},
        {value: '2', displayName: 'Orange'}
     ];
    
      $scope.selectedFruit = '2';
}