top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is the difference between Angular $q vs javascript promise?

0 votes
703 views
What is the difference between Angular $q vs javascript promise?
posted May 31, 2018 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

$q
Promise In Angularjs- $q Service. Promises in AngularJS is provided by $q service. It has reach feature like any other Promise library. $q service is a service that helps you to run your code asynchronously.

Javascript Promises
The promise constructor takes one argument, a callback with two parameters, resolve and reject. Do something within the callback, perhaps async, then call resolve if everything worked, otherwise call reject.

answer Jun 30, 2018 by Maninder Bath
...