You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
555B

  1. import { HttpParameterCodec } from '@angular/common/http';
  2. /**
  3. * Custom HttpParameterCodec
  4. * Workaround for https://github.com/angular/angular/issues/18261
  5. */
  6. export class CustomHttpParameterCodec implements HttpParameterCodec {
  7. encodeKey(k: string): string {
  8. return encodeURIComponent(k);
  9. }
  10. encodeValue(v: string): string {
  11. return encodeURIComponent(v);
  12. }
  13. decodeKey(k: string): string {
  14. return decodeURIComponent(k);
  15. }
  16. decodeValue(v: string): string {
  17. return decodeURIComponent(v);
  18. }
  19. }