I am trying to sort same structure table but different data with Angular. The Plunker example can see here
The problem is how can I sort for only a specific table not for all the table. I think I can achieve the result by make new variables to store different values for different tables but there is any alternative and efficient way to do it.
Sample data:
$scope.friends =
[{name:'John', phone:'555-1212', age:10},
{name:'Mary', phone:'555-9876', age:19},
{name:'Mike', phone:'555-4321', age:21},
{name:'Adam', phone:'555-5678', age:35},
{name:'Julie', phone:'555-8765', age:29}];
$scope.close_friends =
[{name:'Alan', phone:'555-1212', age:21},
{name:'Jen', phone:'555-9876', age:29},
{name:'David', phone:'555-4321', age:24},
{name:'Raya', phone:'555-5678', age:25},
{name:'Brok', phone:'555-8765', age:28}];
$scope.very_close_friends =
[{name:'Peter', phone:'555-1212', age:41},
{name:'Beck', phone:'555-9876', age:39}];