//deferred.promise.then().then()

 deferred.promise.then(function () {
console.log('1 resolve');
return $q.when();
}, function () {
console.log('1 reject');
return $q.reject();
   // 第二then
}).then(function () {
console.log('2 resolve');
});

备注:successCallback 和 errorCallback 方法必须返回一个新的 promise,否则第二then默认会执行。

最新文章

  1. HttpContext详解
  2. Unity调试相关
  3. python模块介绍- collections(5)-OrderedDict 有序字典
  4. Redis主从在线互相切换
  5. IT Operations(IT 运营),运维的更价值化认识
  6. 【POJ 2096】Collecting Bugs 概率期望dp
  7. WEB移动应用框架构想(转载)
  8. php header 函数详解
  9. iOS __block用法
  10. C++中虚函数的作用是什么?它应该怎么用呢?(转)
  11. 解决删除Volume报错的问题
  12. 在JSP里使用CKEditor和CKFinder
  13. 数字化工厂解决方案——OA办公自动化与ERP
  14. Redis的数据结构之sorted-set
  15. C - Friends and Subsequences
  16. js判断变量的类型(使用闭包来玩一把)
  17. $\mathfrak {reputation}$
  18. C# 自己动手实现Spy++(二)
  19. CRC8算法DELPHI源码
  20. 定时删除elasticsearch的index

热门文章

  1. Thingsboard学习之一CentOS安装系统更新
  2. Linux 一条命令杀死占用端口的所有进程
  3. redis json 降低性能 使用 hash
  4. maven install的时候把源码一起放到仓库
  5. NTC热敏电阻基础以及应用和选择(转)
  6. LC 918. Maximum Sum Circular Subarray
  7. 26Flutter 日期 和时间戳/格式化日期库/flutter异步/ 官方自带日期组件showDatePicker、时间组件showTimePicker以及国际化
  8. ElasticSearch——冷热(hot&warm)架构部署
  9. (二)第一个Servlet
  10. .Net Core 精选公众号集合(保持更新)