How to access the value of a promise?

后端 未结 12 2309
予麋鹿
予麋鹿 2020-11-22 06:55

I\'m looking at this example from Angular\'s docs for $q but I think this probably applies to promises in general. The example below is copied verbatim from the

12条回答
  •  旧时难觅i
    2020-11-22 07:14

    .then function of promiseB receives what is returned from .then function of promiseA.

    here promiseA is returning is a number, which will be available as number parameter in success function of promiseB. which will then be incremented by 1

提交回复
热议问题