如何使用angularjs绑定下拉列表 [英] how to bind drop down with angularjs

查看:81
本文介绍了如何使用angularjs绑定下拉列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们希望通过angularjs绑定下拉列表,选择索引更改

we want to bind dropdown though angularjs on selected index change

@Html.DropDownList("Dep_Name", (IEnumerable<SelectListItem>)ViewBag.Dep_Name as SelectList, "Select Department", new { @class = "form-control" })

推荐答案

视频的一个很好的例子:



http://techbrij.com/angularjs-cascade-dropdownlist-asp-net- mvc [ ^ ]
A good example with Video:

http://techbrij.com/angularjs-cascade-dropdownlist-asp-net-mvc[^]


@ Html.DropDownList(Desg_Name,(IEnumerable< selectlistitem>)ViewBag.Desg_Name as SelectList,Select Designation,new {onchange =this.form.submit(), @class =form-control})
@Html.DropDownList("Desg_Name", (IEnumerable<selectlistitem>)ViewBag.Desg_Name as SelectList, "Select Designation", new { onchange = "this.form.submit()", @class = "form-control" })


这篇关于如何使用angularjs绑定下拉列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆