Angular: Empty Fiddle

http://angularjs.org/

HTML

<script src="https://code.angularjs.org/1.5.0/angular.js"></script>
<div ng-controller="MyCtrl">
<select class="form-control" ng-model="mySel">
    <option ng-repeat="option in data" value="{{ option.id }}">@{{ option.name }}</option>
</select>

<button type="button" class="btn btn-primary" ng-click="getData();">Select</button>
</div>

JavaScript

var myApp = angular.module('myApp',[]);
myApp.controller('MyCtrl',function($scope, $timeout) {
$scope.data=[{id:1,name:"test2"},{id:2,name:"test"}];
  $scope.getData = function() {
    alert($scope.mySel);
   }
});