I have an MVC Enum List that I want to bind in a dropdown using angular method. How could it possible?
public enum DefultBookType : byte
{
Not Direct= 0,
Individual = 1
}
public ActionResult Application(){
ViewBag.BT = Enum.GetNames(typeof(DefultBookType)).ToList();
return View();
}
@{
var lstBT= @ViewBag.BT
}
<select ng-model="Btype" ng-options="ctr as ctr.Name for ctr in lstBT track by ctr.Id">
<option value="">select</option>
</select>