想要在负载上设置下拉值。 [英] Want to set drop down value on load.
本文介绍了想要在负载上设置下拉值。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在该表中有表,我已经在每一行中下拉了,我想设置下拉值,值来自数据库。
i已编写下面提到的代码,但这只适用于agular js中最后一个值的值
我尝试过的事情:
< select class =form-control agentValuestyle =padding:unset; ng-model =selectedAgent [$ index]ng-change =setAgentID($ index)>
< option value =>选择代理商< /选项>
< option ng-repeat =agentlist中的aListvalue ={{aList.LOGIN_ID}}ng-selected =request.COLLECTION_AGENT_ID == aList.LOGIN_ID> {{aList.FIRST_NAME}} {{aList.LAST_NAME}}< /选项> < / select>
解决方案
index]ng-change =setAgentID(
index)>
< option value =>选择代理商< /选项>
<选项ng-repeat =代理商列表中的aListvalue ={{aList.LOGIN_ID}} ng-selected =request.COLLECTION_AGENT_ID == aList.LOGIN_ID> {{aList.FIRST_NAME}} {{aList.LAST_NAME}}< / option>< / select>
i have table in that table, i have drop down in each row and i want to set the value of drop down and value is coming from the database.
i have write the code mentioned below, but this works for only the value which is the last in drop down in agular js
What I have tried:
<select class="form-control agentValue" style="padding: unset;" ng-model="selectedAgent[$index]" ng-change="setAgentID($index)"> <option value="">Select Agent</option> <option ng-repeat="aList in agentlist" value="{{aList.LOGIN_ID}}" ng-selected="request.COLLECTION_AGENT_ID == aList.LOGIN_ID">{{aList.FIRST_NAME}} {{aList.LAST_NAME}}</option> </select>
解决方案
index]" ng-change="setAgentID(
index)"> <option value="">Select Agent</option> <option ng-repeat="aList in agentlist" value="{{aList.LOGIN_ID}}" ng-selected="request.COLLECTION_AGENT_ID == aList.LOGIN_ID">{{aList.FIRST_NAME}} {{aList.LAST_NAME}}</option> </select>
这篇关于想要在负载上设置下拉值。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文