I am in the process of populating a dropdown menu with data retrieved from a database. Despite successfully fetching the data, I am encountering an issue where the dropdown menu is not being filled as expected. When I check the value using console.log, it appears to be
getPdfControls().then(function (response) {
$scope.PdfControls = response;
});
function getPdfControls() {
return $http.post(baseUrl + 'Admin/getPdfControls').then(function (response) {
console.log($.parseJSON(response.data));
return $.parseJSON(response.data);
})
}
<md-select ng-model="selected.pdfControl" ng-change="changePdfControl(selected.pdfControl)" required >
<md-option ng-repeat="pdfControl in pdfControls" value="{{pdfControl.ControlColumn}}">{{pdfControl.ControlText}}</md-option>
</md-select>