JSFiddle - React, Tailwind, and code Playground
HTML
<div ng-app="myApp" ng-controller="MyCtrl">
<select ng-model="addressData.state" style="width: 50%;"
ng-options="state.name as state.name for state in states" >
<option value="" ng-disabled="true">-- select state --</option>
</select>
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) {
$scope.states = [
{ code: "C", name: "CCCCC" },
{ code: "Q", name: "QQQQQQ" }
];
}