Hey guys,
I know, this topic is discussed a lot in here, and there's also a documentation about select and the ng-options directive, but I still can't get a simple select working with my data.
The goal:
<select>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
Nothing serious. My data looks like this:
$scope.countOptions = {
"1":"1",
"2":"2",
"3":"3"
};
So how does the ng-options attribute has to look like?
<select ng-model="count" ng-options="label for (key, value) in countOptions"></select>
Doesn't work.
Please help me out!