I am new to angularjs
. I have a function like this -
for(var i=0; i < uploadService.getOrphans().length; i++ ) {
var orphan = uploadService.getOrphans()[i].attributes.text;
$timeout(function () {
//Here I am using a orphan but its taking only last element.
}, 0);
}
Here, I want to use the orphan but it's taking only last element into consideration. Can anyone give me a solution?