Closed mokipedia closed 4 years ago
One way to solve this is to use a object literal instead of a class instance for CustomParameterEncoder. However this seems to have some issues after prod build and sometimes simply does not work as expected.
Another way would be to give only the Class reference to config and instantiate it in HttpCacheInterceptor
.
However this would be a breaking change.
I'm submitting a...
Current behavior
Currently parameterCodec in config as it is shown in the readme does not work für AOT compilation. The problem is the constructor call of new CustomHttpParamEncoder() in @NgModule.
Expected behavior
possibility to give CustomHttpParamEncoder to config so the request params are correctly encoded / decoded.
Minimal reproduction of the problem with instructions
add parameterEncoder to config and compile with AOT.
Environment