JSFiddle - React, Tailwind, and code Playground
by johnwun
HTML
<div ng-app ng-controller="ExampleCtrl">
<select ng-model="selectedColor" ng-options="color.name for color in colors">
<option value="" selected>Select Color ..</option>
</select>
value is {{ selectedColor }}
</div>
CSS
.ng-scope{border:1px dotted red;}
JavaScript
function ExampleCtrl($scope) {
$scope.color = {};
$scope.colors = [
{ name: "red" },
{ name: "yellow" },
];
var newColor = $scope.color;
newColor.name = "blue"
$scope.colors.push(newColor);
$scope.selectedColor = newColor;
}