angular-cn/packages/common
Alex Rickabaugh 120bdeecdc fix(common): allow HttpInterceptors to inject HttpClient (#19809)
Previously, an interceptor attempting to inject HttpClient directly
would receive a circular dependency error, as HttpClient was
constructed via a factory which injected the interceptor instances.
Users want to inject HttpClient into interceptors to make supporting
requests (ex: to retrieve an authentication token). Currently this is
only possible by injecting the Injector and using it to resolve
HttpClient at request time.

Either HttpClient or the user has to deal specially with the circular
dependency. This change moves that responsibility into HttpClient
itself. By utilizing a new class HttpInterceptingHandler which lazily
loads the set of interceptors at request time, it's possible to inject
HttpClient directly into interceptors as construction of HttpClient no
longer requires the interceptor chain to be constructed.

Fixes #18224.

PR Close #19809
2018-01-29 16:12:32 -08:00
..
http fix(common): allow HttpInterceptors to inject HttpClient (#19809) 2018-01-29 16:12:32 -08:00
locales fix(common): extract plural function from i18n locale data files for TS 2.6 (#21626) 2018-01-19 13:23:34 -08:00
src docs: change ”it's" to "its" as needed in several docs. (#21867) 2018-01-29 11:34:46 -08:00
test fix(common): A null value should remove the style on IE (#21679) 2018-01-22 12:54:49 -08:00
testing feat(router): add navigationSource and restoredState to NavigationStart event (#21728) 2018-01-29 10:22:59 -08:00
BUILD.bazel build: move repeated tsconfig attributes to a macro (#20964) 2018-01-10 12:30:19 -08:00
index.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
package.json build(common): specify explicit locales dir in package.json (#21016) 2018-01-25 22:18:35 -08:00
public_api.ts build: add bazel test rules for more packages (#21053) 2017-12-22 13:10:51 -08:00
rollup.config.js fix: add missing globals from each rollup configuration (#20028) 2017-10-30 23:09:17 -04:00
tsconfig-build.json build: remove references to `tsc-wrapped` (#19298) 2017-09-21 13:55:52 -07:00