What's the equivalent of Angular's $q in Angular2?

前端 未结 2 409
粉色の甜心
粉色の甜心 2021-01-07 17:39

What\'s the equivalent of Angular\'s $q in Angular2? Specifically, I\'m looking for $q.when, which allowed you to do something like:

return $q.         


        
2条回答
  •  醉话见心
    2021-01-07 18:13

    You can use the native es6 Promise. One of the main reason to make new angular is es6 and nearly comming es7.

提交回复
热议问题