Is there a easy way to have options as objects in array? Like following:
$scope.search.categories = [{id: '1',name: 'first'},{id: '2',name: 'last'}];
<select ui-select2 ng-model="search.categories" multiple style="width:300px" data-placeholder="select category">
<option ng-repeat="category in search.categories" value="{{category}}">{{category.name}}</option>
</select>
Or am I totally wrong?