Skip to content

Instantly share code, notes, and snippets.

@DrMabuse23
Created November 17, 2014 21:24
Show Gist options
  • Save DrMabuse23/29870ee7a6dfbe931542 to your computer and use it in GitHub Desktop.
Save DrMabuse23/29870ee7a6dfbe931542 to your computer and use it in GitHub Desktop.
ar deferred = $q.defer();
$http.get('/api/jobs?limit=' + limit + '&full=true').success(function(data) {
var jobs = [];
for (var i = 0; i < data.objects.length; i ++) {
jobs.push(new Job(data.objects[i]));
}
deferred.resolve(jobs);
});
return deferred.promise;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment