Wait for several queries to complete
function dataControler ($scope, $http, $q) {
var names = $http.get("names.json"),
dates = $http.get("dates.json"),
options = $http.get("options.json");
$q.all([names, dates, options]).then(function(arrayOfResults) {
// Callback called when all promised would be resolved
});
}