在angularjs

时间:2017-11-19 08:16:40

标签: html angularjs select

未在模态绑定上选择选择控制值。在这里找到html和控制器代码...我已经通过“greedValuePercentage.Reference_Data_Code”尝试了跟踪但没有用。

HTML:

<select name="valueBasis" 
 class="ContractSelectxs" 
 ng-model="subSection.Agreed_Value_Percentage" 
 ng-options="agreedValuePercentage.Reference_Data_Code as agreedValuePercentage.Reference_Data_Desc for agreedValuePercentage in vm.percentage.Reference_Data"> 
  <option value="">Select Option</option>
</select>

控制器:

vm.percentage = $filter('filter')(result, { Reference_Type_Code: 'Percentage' })[0];

来自DB的模型值(假设为20) -

subSection.Agreed_Value_Percentage = 20;

0 个答案:

没有答案