I want to save the selected value and pop up the selected value . But when I add the ng- change directive the select stops functioning. If you remove the ng change the droplist is displayed. Help me out.
This is my html
<div ng-app="HelloApp">
<div ng-controller="MyCtrl">
<p>Term</p>
<select ng-model="bob" ng-change="test()" ng-options="x for x in nos">
</select>
</div>
</div>
And this is my js script
**var app = angular.module('HelloApp', []);
app.controller('MyCtrl', function($scope) {
console.log('ctrl working');
$scope.test = function () {
nos=["5", "10", "15"];**
var kill=$scope.bob;
alert ("changed!"+ kill);
}
});
I am new to angular and internet searches only land to complex arrays not a simple one. Please help