AngularJS promises with $q are used for asynchronous operations. $q allows the creation, resolution, and chaining of promises in Angular applications.
$q
const deferred = $q.defer();