AngularJS do not sort in ng-repeat. I did,
<div ng-repeat="list in lists">
<div style="float: left; margin-left: 5px;">
<div id="tasks" >
<h3>{{ list.name }}</h3>
<ul>
<li ng-repeat="card in cards | orderBy:'card.position'" ng-if="list._id == card.list">{{ card.position }}<button ng-click="take(card.position)">HERE</button>{{ $index }}</li>
</ul>
<form ng-submit="addTask(list._id, $index, newTask)">
<input type="text" ng-model="newTask" placeholder="add a new task" required />
</form>
</div>
</div>
</div>
console.log($scope.cards[0]);
And output of the above code is :
Object { _id: "59bc0936c84be51d70f786e7", name: "first", list: "59bbdeae1ebcd215a4b7af62", position: 7200, __v: 0, created: "2017-09-15T17:09:10.813Z", updated: "2017-09-15T17:09:10.813Z" }
https://i.sstatic.net/RF3k4.jpg
Where could I have made a mistake?