My controller:
$scope.taglist = [{"name":"Fruit_Type","value":"0"},
{"name":"Leaves_Arrangment","value":"?"},
{"name":"Leaves_Margin","value":"?"},
{"name":"Leaves_Type","value":"?"}];
Here is my form
<form id="filter_form" onchange="angular.element(this).scope().fileNameChanged(this)" novalidate class="simple-form">
<div ng-repeat="(key, value) in tags.tags.objects | groupBy:'category.name'">
<div class="item item-divider">
{{ key }}
</div>
<label class="item item-input item-select" ng-repeat="(item_key, item) in value | groupBy:'subcategory.name'">
<div class="input-label">
{{ item_key }}
</div>
<select name="{{ key }}_{{ item_key }}" ng-model="taglist" ng-options="option.description for option in item">
<option ng-value="">------</option>
</select>
</label>
</div>
</form>
Currently selected: {{ taglist }}
Currently selected shows:
Currently selected: [{"name":"Fruit_Type","value":"0"},
{"name":"Leaves_Arrangment","value":"?"},
{"name":"Leaves_Margin","value":"?"},
{"name":"Leaves_Type","value":"?"}]
Why is the select options not set according to the $scope.taglist? Im under the impression that this is what is supposed to happen. So Fruit Type should have options 0 selected, the rest none.
Im just trying to get the form in the state as the taglist is in