afridi shayed afridi shayed - 1 year ago 81
AngularJS Question

Dropdown list values not being populated

My aim is to show values in a dropdown list.

My code gets the data from database but the dropdown list is not being populated

$scope.CountryID = xxx.CountryID;

Answer Source

To show data in DropDown list you need use ng-repeat


    <option ng-repeat="cate in category" value="{{}}">{{}}<option>

In above code category is a $scope with data from DB

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download