Last active
December 18, 2015 00:29
-
-
Save realyze/5697199 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var qProjects = $http.get('db/view/projects/all') | |
.then(function(res){ | |
if ( ! res.data) { | |
$q.reject(new Error('No project data received.')); | |
} | |
return data; | |
}); | |
var qClients = $http.get('db/view/clients/map') | |
.then(function(res) { | |
if ( ! res.data) { | |
$q.reject(new Error('No client map data received.')); | |
} | |
}); | |
$q.all([qProjects, qClients]).then(function(results) { | |
//results == [projects, clients] | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment