我在 Angular 5 中有一个有效的拦截器。它在 App.module 的提供者中注册,并正确拦截了从应用程序发出的所有请求。
问题是它不会拦截从应用程序使用的库发出的请求。
我正在使用开源库 (NGX-Jsonapi),并且需要拦截器在库向后端发出的每个请求中提供令牌。
有人遇到同样的问题吗?
编辑:该库使用 HttpClient。
interceptor angular-http-interceptors angular
angular ×1
angular-http-interceptors ×1
interceptor ×1