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 array looks like this
vm.array1=[object1,object2,object3]
vm.array2=[object1,object2,object3]
I need to pass only object of first element of array1 with the object of first element of array2 to the function.
vm.save(a,b){
//save functionality success by calling API
}
variables a,b should contain only the first elements of both the array simultaneously followed by second elements then third...
How can i pass only objects but not arrays to the function using angularJS?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…