title: Ng-models not accessible
body: <p>One of the ng-models gives null value. When I click the button with the function <code>setNewRecord</code> the parameter <code>selectedDocument</code> is null. The first two parameters are correct. The javascript code is added as well.</p>
  
  <pre><code>&lt;form name="myForm" &gt;
  &lt;div&gt;
      &lt;select ng-model="selectedCompany"&gt;
          &lt;option value=""&gt;-- Select Company --&lt;/option&gt;
          &lt;option data-ng-repeat="currentSetting in currentSettings" value={{currentSetting.SCACCode}}&gt;{{currentSetting.SCACCode}}&lt;/option&gt;
      &lt;/select&gt;
  &lt;/div&gt;
  &lt;div&gt;&lt;input id="Text1" type="text"  ng-model="enteredCustomer"/&gt;&lt;/div&gt;
  &lt;div&gt;
     &lt;select ng-model="selectedDocument" ng-click="getTypes(selectedCompany, enteredCustomer)"&gt;
         &lt;option value=""&gt;-- Select Doc type --&lt;/option&gt;
         &lt;option data-ng-repeat="docSetting in docSettings" value="{{docSetting.Doc_Type}}"&gt;{{docSetting.Doc_Type}}&lt;/option&gt;
     &lt;/select&gt;
  &lt;/div&gt;
  &lt;input id ="btnAdd" type="button" value="Add new record" ng-click="setNewRecord(selectedCompany, enteredCustomer,selectedDocument)"/&gt;
  </code></pre>
  
  <p></p>
  
  <p>Java Script</p>
  
  <pre><code>myApp.service('getDocTypesService', ['$http', '$q', function($http, $q) {
  var allSettings = null;
  this.getDocTypes = function(compName, custName) {
      var def = $q.defer()
      if (allSettings) {
          def.resolve(allSettings);
      } else {
          $http.post('GetDocTypes', {
                  companyName: compName,
                  customerName: custName
              })
              .then(function(response) {
                  var response = $.parseJSON(response.data)
                  allSettings = response;
                  def.resolve(allSettings);
              });
      }
      return def.promise;
  }
  }]);
  
  
  
  myApp.controller('myController', ['$scope', 'getDocTypesService',
  function($scope, getDocTypesService) {
      $scope.getTypes = function(comp, cust) {
          getDocTypesService.getDocTypes(comp, cust).then(function(value) {
              $scope.docSettings = value
          });
      };
  
  }
  ]);
  </code></pre>