I have an AngularJS Select control on the page, the options are bounded dynamically based on rest query. On initial page load I can see the Select options. But as soon as I select one option, the Select control options vanish (getting emptied). If I do page refresh (browser refresh) then I can again see the options.
How to ensure the Options are always bound to select control even after selecting a value?
<select id="ddlLanguage" class="input-block-level" ng-model="languagedata" ng-options="rows1.Language for rows1 in languagedata" ></select>
myAngApp.controller('myController', function ($scope, $http) {
$http({
method: 'GET',
url: _spPageContextInfo.webAbsoluteUrl + "/_api/Web/Lists/GetByTitle('LangHelpFiles')/items?$select=Language",
headers: { "Accept": "application/json;odata=verbose" }
}).success(function (data, status, headers, config) {
$scope.languagedata= data.d.results;
}).error(function (data, status, headers, config) {
alert(status);
});//end http
});//end controller