AngularJs获取所选选项的值 [英] AngularJs Get the value of the selected option
本文介绍了AngularJs获取所选选项的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何获取ng-change"ReadData"上所选选项的值 模板是标题,ID和正文的数组
How can i get the value of the selected option on the ng-change "ReadData" Template is an array of Title, Id, and body
<select class="form-control" id="inputEmail"
ng-change="ReadData(Template.Title)"
ng-model="email.Template" name="inputEmail"
ng-options="b.Id as b.Title for b in Template">
</select>
推荐答案
这可能有效:
ng-change ="ReadData(Template [$ index] .Title)"
ng-change="ReadData(Template[$index].Title)"
这篇关于AngularJs获取所选选项的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文