Angular UI select2 - How to stop automatic sorting?

The following data is attached to select2 via Angular UI: (Live example here)

JS:

$scope.items = [
  {id: 1, text: 'elephant'}, 
  {id: 2, text: 'desk'}, 
  {id: 3, text: 'car'}, 
  {id: 4, text: 'boat'}, 
  {id: 5, text: 'apple'}
];
$scope.selected = [];

HTML:

<select ui-select2 
        multiple 
        ng-model="selected" 
        data-placeholder="Please select..." 
        style="width:200px">
  <option></option>
  <option ng-repeat="item in items" value="{{item.id}}">{{item.text}}</option>
</select>

However, every time item is selected, it sorts the selected items by id. For example, if you choose "apple" and then "boat", the selected items will be "boat" and "apple" (in this order!).

How could I preserve the order and disable this automatic sorting?

Looks like it preserves the order if you use ng-options instead of doing an ng-repeat for each of the items like seen here

All you have to do is delete this line:

<option ng-repeat="item in items" value="{{item.id}}">{{item.text}}</option>

And then add a directive like this to your tag:

ng-options="item.text for item in items"

This will make it so the entire item object gets appended to the selected list, instead of just the ID, so you will need to take that into account.