This needs to resolve a promise when all requests are fulfilled. Use promise arrays, covered in the $q documentation.