How to Retrieve Selected Value in AngularJS
HTML
<select data-ng-model='datasource.value' ng-options='sourcetype.dataSourceType as sourcetype.dataSourceDesc for sourcetype in sourcetypes' data-ng-change="getAccountCredentials(sourcetype);">
<option disabled value="" selected>Choose One</option>
</select>
JavaScript
$scope.getAccountCredentials = function(data){
console.log(data);
}
I'm having trouble retrieving the selected values.
Can anyone suggest the angular way to achieve this?