I wish to create something like this:
<select class="form-control" ([ngModel])="selectedWorkout" (ngModelChange)="updateWorkout($event)" #selectList="ngModel">
<option value="44">Pick me!</option>
</select>
Using Html.DropDownFor in razor. How can I do that? Specifically, how do I add in ([ngModel]), (ngModelChange), and #selectList?
My dropdownfor is like:
@Html.DropDownListFor(m => m.itemId, Model.itemList, new { @class = "form-control" })
I ended up finding this out. One of the overloads uses a dictionary for the html attributes rather than an object. I use this dictionary to add the required elements.