Skip to content

Instantly share code, notes, and snippets.

@The-Quill
Last active June 26, 2016 22:16
Show Gist options
  • Save The-Quill/fd98e47af77aae29402d70ad83397f60 to your computer and use it in GitHub Desktop.
Save The-Quill/fd98e47af77aae29402d70ad83397f60 to your computer and use it in GitHub Desktop.
return this.apiService.getData<string>(`someRoute`);
var deferred = this.$q.defer();
this.apiService.getData<string>(`someRoute`)
.then((result: any) => {
deferred.resolve(result);
}, error => {
deferred.reject(error);
});
return deferred.promise;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment