JSFiddle - React, Tailwind, and code Playground
by mavdhana
HTML
<div ng-controller="CountryCntrl">
<div>
Countries:
<select id="countryId" ng-model="states" ng-options="country for (country, states) in Countries">
<option value=''>Please Select</option>
</select>
</div><br>
<div>
States: <select id="statesId" ng-disabled="" ng-model="cities" ng-options="state for (state,city) in states"><option value=''>Please Select</option></select>
</div>
</div>
JavaScript
function CountryCntrl($scope) {
$scope.Countries = {
'Country1': {
'State1': [],
'State2': [],
'State3': []
},
'Country2': {
'State4': [],
'State5': []
},
'Country3': {
'State6': [],
'State7': [],
'State8': []
}
};
}