title: id as ng-model for select in angularjs
body: <p>I am not getting the id value of the option value of selected item of  tag.</p>
  
  <pre><code>&lt;div ng-controller="UserCreationCtrl"&gt;
      &lt;form novalidate="novalidate" class="form-horizontal"&gt;
          &lt;div class="control-group"&gt;
              &lt;label class="control-label" for="inputFirstName"&gt;First name:&lt;/label&gt;
  
              &lt;div class="controls"&gt;
                  &lt;input type="text" id="inputFirstName" ng-model="doctor.firstName" placeholder="First name"/&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;div&gt;
              &lt;span  class="nullable"&gt;
                  &lt;select ng-model="user.lookupId" ng-options="select as speciality.lookupName for speciality in specialityList" ng-change="selectedSpecilaty()"&gt;
                      &lt;option value=""&gt;-- choose speciality --&lt;/option&gt;
                  &lt;/select&gt;
              &lt;/span&gt;
          &lt;/div&gt;
      &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>My controller </p>
  
  <pre><code>app.controller('UserCreationCtrl', ['$scope', 
      function ($scope) {
  
      $scope.specialityList = [
                                   {lookupId : 1, lookupName: 'speciality1'},
                                   {lookupId : 2, lookupName: 'speciality2'},
  
                                   {lookupId : 4, lookupName: 'speciality6'},
                                   {lookupId : 3, lookupName: 'speciality3'}
                                   ];
  
      $scope.user = {firstName: 'first name value', lookupId : 4};
  
      $scope.selectedSpecilaty = function()
      {
          alert($scope.user.lookupId);
      }
  }]);    
  </code></pre>
  
  <p>How can i do this. the alert box displying the value as 'undefined'.</p>