I am using angular js ng-repeat and I want to show specific element first
For example I have this object
$scope.user = {
age: {
display: "Age",
val: "21"
},
firstName: {
display: "First Name",
val: "John"
},
lastName: {
display: "Last Name",
val: "Smith"
},
}
And using ng-repeat like this.
<tr ng-repeat = "(key, value) in user">
<td ng-model = "user[key].display"></td>
<td ng-model = "user[key].val"></td>
</tr>
If I use ng-repeat, it shows age, firstName and lastName, but I want to show firstName in ng-repeat first.
Thank you.