title: bootstrap-angular modal dialog: can not return value from select
body: <p>I have an angular-bootstrap modal dialog with the following template (jade syntax): </p>
  
  <pre><code>div.modal-body
    select(ng-model="chosenProject" id="chosenProject",  ng-options="c.value as c.name for c in selectItems")
  div.modal-footer
    button.btn.btn-primary(ng-click="ok()")   Change project
    button.btn.btn-warning(ng-click="cancel()")  Cancel
  </code></pre>
  
  <p>The pre-filling of the array works just fine. Dialog is configured with its controller that defines trivial ok() function, below is the excepmt from controller's body:</p>
  
  <pre><code>        $scope.chosenProject = 0;  // needed to have selected initial item with value=-1 in the select
          $scope.ok = function () {
              console.log("OK clicked, chosenProject " + $scope.chosenProject);
              $modalInstance.close($scope.chosenProject);
          };
  </code></pre>
  
  <p>The functions work fine. Accodring to console.log, $scope.chosenProject remains the same regardiless of what I chose in select and simply returns whatever I preset in line "$scope.chosenProject = 0;". I appreciate an advice how to fix this.</p>