I work in asp.net MVC4 with angularJs. I am trying to add "ng-model" to the dropdownlist. My DropDownListis is like this:
@Html.DropDownList("UnitConversionId", (IEnumerable<SelectListItem>)ViewBag.UnitConversionId, "No Unit Seleced", new { ng-model="newItem.UnitConversionId" })
I also tried this. But I get an error message:
@Html.DropDownList("UnitConversionId", (IEnumerable<SelectListItem>)ViewBag.UnitConversionId, "No Unit Seleced", new { @ng-model="newItem.UnitConversionId" })
Can I add "ng-model" to DropDownList?
source share