JSFiddle - React, Tailwind, and code Playground
HTML
<div ng-app="myApp" ng-controller="MyCtrl">
<select class="form-control" name="theModel" ng-model="theModel"
ng-options="c.value as c.name for c in items" >
<option value=""> -- </option>
</select>
<pre>{{theModel|json}}</pre>
</div>
CSS
/* Put your css in here */
.pristine.true, .dirty.true, .invalid.true {
background: gray;
}
.valid.false {
background: red;
}
.valid.true {
background: green;
}
.error {
color: red;
}
JavaScript
angular.module('myApp', []);
function MyCtrl($scope, $timeout) {
$scope.items = [
{ value: "C", name: "Process C" },
{ value: "Q", name: "Process Q" }
];
$timeout(function(){
$scope.items.push({ value: "New", name: "Process New" });
},3000);
}