I have something like this:
[
{name: 'Julian', number: 1},
{name: 'Mike', number: 2},
{name: 'Carlos', number: 3},
{name: 'Juan', number: 4},
{name: 'Kate',number: 5},
]
and an orderBy: 'number' in a ng-repeat. It is working perfect but I need to exchange that values of numbers, for example now I need that Juan has a number 2 and Mike has a number 4, and then I need them to reorder. I have a filter before that and the filter is receiving the correct change but then when it orderBy the number I don't know why it is ordering as the first time it oredered. It isn't taking in account that the number value had changed.
Anyone knows about a solution ?
Edited:
Here is an example of a kind of what I want to do: