afridi shayed afridi shayed - 2 months ago 9
AngularJS Question

In AngularJs why dropdown not showing value while editing mode

$scope.CountryID = xxx.CountryID;


Here my aim is to Showing values in DropList. This is my Code here I'm getting data from database but why values not binding in dropdownlist?

Answer

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

eg:-

<select>
    <option ng-repeat="cate in category" value="{{cate.id}}">{{cate.name}}<option>
</select>

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