title: Error: ngModel: Non-Assignable Expression
body: <p>I have code which generates drop down list dynamically. I want to set selected value using ng-repeat, to do this i am using function in ng-model but i am getting </p>
  
  <pre><code>Error: [ngModel:nonassign] Expression 'item.blockName = getCurrentComboBoxValue(item.blockName.id, blockNameOptions)' is non-assignable. Element: &lt;select class="form-control input-sm" ng-model="item.blockName = getCurrentComboBoxValue(item.blockName.id, blockNameOptions)" name="blockName" ng-options="choice.id as choice.value for choice in blockNameOptions"&gt;
  </code></pre>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;div ng-repeat="item in modulesData.blocks track by item.id"&gt;
      &lt;select class="form-control input-sm" ng-model="item.blockName = getCurrentComboBoxValue(item.blockName.id, blockNameOptions)" name="blockName" 
          ng-options="choice.id as choice.value for choice in blockNameOptions"&gt;
  
      &lt;/select&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>$scope.getCurrentComboBoxValue = function (id, availableData) {
      var result = _.where(availableData, { 'id': id });
      return result[0];
  }
  </code></pre>