What Is A Promise In Angular Programming Code?
- Forums
- Angular
- What Is A Promise In Angular Programming Code?
this page will provide you with an exact description of what a promise is in javascript using angular code like ecmascript [4644], Last Updated: Mon Jun 24, 2024
Angular2
Wed Feb 01, 2017
0 Comments
434 Visits
A Promise is ...
it's a promise to call you back later when the query results are ready.
you ask an asynchronous service to do some work and give it a callback function.
It does that work (in the cloud for example) and eventually it calls your function with the results of the work or an error.
basically, what this means is that, you send a request, and the query gives you a promise to return the results of your query, whether the results is an error or your data
get more info here:
http://exploringjs.com/es6/ch_promises.html