I cannot figure out why data binding is not working on a select tag, as the docs specifies.
This is my select element:
<select id="start-type" ng-model="startType">
<option value="day-of-week">Day of the week</option>
<option value="month">Month</option>
<option value="month-day">Day and month</option>
<option value="year">Year</option>
<option value="year-month">Month and year</option>
<option value="local-time" selected>Time</option>
<option value="local-date">Date</option>
<option value="local-date-time">Date and time</option>
</select>
<label for="start-type">Start type</label>
The issue is that whenever an item is selected the $scope.startType
model is never changed. It's always blank.
I have tried defining $scope.startType
in my controller but I don't see why that would change anything because it should work as it already is. And of course, it didn't help.
I have gone through several working examples, but I can't see what I am missing here.
Edit: I figured out what's happening. The CSS framework I am using didn't have Angular in mind at all. It is rendering a custom view for a select using its own divs and layout, while hiding the actual select element. But they didn't even hook the select action into the hidden select, so the angular directives or data binding are never being triggered... Any clue on how I could put it all together?