vm.array1.push(content1); vm.array2.push(content2);
I have a above two arrays with a data of objects pushed at each time and the data modal of each
At the simplest you can do following. (This solution will modify your arrays)
do{ vm.save(vm.array1.shift(), vm.array2.shift()){ //save functionality success by calling API } }while(vm.array1.length>0)