I'm using the following piece of code to select item if it is present in filters
<div ng-repeat="category in categories.data" ng-model="div1">
<div ng-repeat="(key, value) in category" mg-model="div1.div2">
{{ key + ":"}}
<select id={{key}} class="my_select"
data-ng-model="CategoryOption"
data-ng-change="updateCategories()"
data-ui-select2="{}" multiple >
<option ng-repeat="c in value"
ng-selected="(filters[key].length>0) && (filters[key].indexOf(c.trim()) !== -1)" >
{{c.trim()}}</option>
</select>
</div>
</div>
But it actually doesn't select anything... Other option is to set ng-model to filters.key, but selecting one element will cancel out the selection in another select, because they are bind to the same model...
Given my setup from above, how can I restore my selection, using select2 multiple ?