【发布时间】:2017-07-03 00:52:15
【问题描述】:
虽然 angular2 中有许多支持上传/下载进度的临时库,但我不知道如何在上传/下载时使用原生 angular2 http api 来显示进度。
之所以要使用原生http api是因为我要使用
- http 拦截器(http API 包装器)围绕本地 http api 验证、缓存和丰富正在发送的实际 http 请求,例如 this 和 this
- 除了 Angular 的 http api 比任何 adhoc API 更强大
this nice article 介绍了如何使用 Angular 的 http api 进行上传/下载
但是文章提到没有原生的方式来支持进度。
有没有人尝试使用 http api 来显示进度?
如果没有,您是否知道 Angular 存储库中有一个问题?
【问题讨论】:
-
有人要求结束这个问题,说它太宽泛了。好吧,它不是。有没有人使用 Angular 的 http api 来跟踪进度?任何通用 Http API 都应该在此上下文中使用。它尽可能具体。
标签: http angular interceptor angular2-http