На основании того, что у вас есть и что вы хотите иметь.Вот как вы получаете.
list1 = [{name: 'apple'}, {name: 'pear'},{name: 'banana'}];
list2 = ['banana', 'apple', 'pear'];
var result = [];
function getData(){
list2.forEach(function(e){
let obj=list1.find(element=>element['name'] === e);
result.push(obj);
})
console.log(result);
}
getData();
// In case you want to preserve with list1
list1.sort(function(a, b){
return list2.indexOf(a.name) - list2.indexOf(b.name);
});
console.log(list1)
Теперь вы можете использовать result
как внутри ng-repeat
;