How can I use select element to sort an array by mutiple fields?
<select ng-model="selectedOrder">
<option value='id'>id</option>
<option value='-id'>-id</option>
<option value='country'>country</option>
<option value='address'>address</option>
<option value='["country","-id"]'>country, -id</option>
<option value='["-country","address"]'>-country, address</option>
</select>
<ul>
<li ng-repeat="detail in details | filter:{country: countryFilter} | orderBy:selectedOrder">{{ detail }}</li>
</ul>
If I set order options in a controller everything is fine:
$scope.selectedOrder = ["country", "-id"];
If select option "country, -id" or "-country, address" then sorting not occurs.
Full example here http://plnkr.co/edit/w968MMN3qT9AB4XXRosV?p=preview