How want to call a webservice using http.get
on Angular 2 handle the result and response to my caller with the result.
Is it better to use callback or promise ?
Thanks!! I use to work in NodeJS and often use callbacks.
How want to call a webservice using http.get
on Angular 2 handle the result and response to my caller with the result.
Is it better to use callback or promise ?
Thanks!! I use to work in NodeJS and often use callbacks.
In NodeJS we do a Callback but in Angular 2 it's better to use Promise or Observable.
Check this post to choose between Promise and Observable: Angular - Promise vs Observable