I'm trying to bind the angularJS ui-sortable to a specific value in the model, list : field.sort_order to be exact.
But cant seem to get it working, the sortable js code is working and moves the objects around in the model but wont update that specific value, basically I don't know how to pass it the specific field to update/read, is this possible?
I have the following scripts for angularJS running:
'//cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.20/angular.js'
'//cdnjs.cloudflare.com/ajax/libs/angular-ui/0.4.0/angular-ui.min.js'
<tbody ui-sortable ng-model="list">
<tr ng-repeat="(key, field) in list">
<td><img src="/images/defaults/updown_ico_small.png"></td>
<td><input type="text" ng-model="field.field_name" /></td>
<td>
<select ng-if="..." ng-model="..." ng-options="..."></select>
<select ng-if="..." ng-model="..." ng-options="..."></select>
</td>
<td>
<button ng-click="...">Delete</button>
</td>
</tr>
</tbody>
This is the output from this snippet

Array example:
1 =>
array
'id' => string '2' (length=1)
'download_type' => string 'custom' (length=6)
'download_ext' => string 'csv' (length=3)
'project_id' => string '157' (length=3)
'DownloadField' => // this is what i call 'list' in the example
array
0 =>
array
'id' => string '18' (length=2)
'field_reference' => string 'FALSE' (length=5)
'field_name' => string 'Delete flag' (length=11)
'sort_order' => string '0' (length=1)
1 =>
array
'id' => string '19' (length=2)
'field_reference' => string 'CUSTOM_RESULT_QUESTION' (length=22)
'field_name' => string 'Category ID' (length=11)
'sort_order' => string '1' (length=1)
2 =>
array
'id' => string '20' (length=2)
'field_reference' => string 'CUSTOM_RESULT_ANSWER' (length=20)
'field_name' => string 'Category Value' (length=14)
'sort_order' => string '2' (length=1)
3 =>
array
'id' => string '21' (length=2)
'field_reference' => string 'company_alt_name' (length=16)
'field_name' => string 'Exhibitor ID' (length=12)
'sort_order' => string '3' (length=1)
2 =>
2 will contain a similar set of data.
listan object or an array?listis an array, the syntax for looping over it should beng-repeat="item in list".