I am displaying countries and cities in a select box in angularjs, which are working fine. ng-model of country displays the output when I call {{country}}. However ng-model of city couldn't be called as {{city}} with its modal name. I want to call it as {{city}} rather than {{city.city}}. Note, both select boxes are working fine except the modal of city, which couldn't be displayed {{city}}
Otherwise, can I obtain city results when I select country through ng-repeat rather than ng-options
<select name="Country" ng-model="country" class="item item-input item-select major" required>
<option value=""> Select a Country </option>
<option ng-repeat="country in countries" value="{{country.iso_code_3}}">{{country.name}}</option>
</select>
<select name="City" ng-model="city" data-ng-options="city.name for city in cities| filter:{CountryCode: country}:true" class="item item-input item-select major" required>
<option value="">-- Select a City --</option>
</select>
Click this Demo example
Html Code for reference:
JS code for reference: