JSFiddle - React, Tailwind, and code Playground
by Gowtham Reddy
HTML
<div ng-app="ngrepeatSelect">
<div ng-controller="ExampleController">
<form name="myForm">
<label for="repeatSelect">Angular select:</label>
<select name="repeallltSelecte"
ng-init=" repeatSelect.date = data[0].id"
ng-model="repeatSelect.date"
ng-options="option.id as option.name for option in data">
</select>
</form>
<br/> <tt>Selected value: {{repeatSelect}}</tt>
</div>
</div>
<br/>
JavaScript
angular.module('ngrepeatSelect', [])
.controller('ExampleController', ['$scope', function ($scope) {
$scope.data = [{
id: '-1',
name: '--Seect--'
}, {
id: '1',
name: 'Option A'
}, {
id: '2',
name: 'Option B'
}, {
id: '3',
name: 'Option C'
}];
}]);