Skip to content

Instantly share code, notes, and snippets.

@nicobytes
Created April 4, 2017 13:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicobytes/e79f050af4eecdd832c8c4ba75ad9376 to your computer and use it in GitHub Desktop.
Save nicobytes/e79f050af4eecdd832c8c4ba75ad9376 to your computer and use it in GitHub Desktop.
ejemplo
return new Promise(resolve => {
this.http.get('https://randomuser.me/api/?results=25')
.map(res => res.json())
.subscribe(data => {
this.data = data.results;
resolve(this.data);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment