mirror of https://github.com/abpframework/abp.git
1 changed files with 20 additions and 0 deletions
@ -1,4 +1,24 @@ |
|||||
|
import { HttpParameterCodec } from '@angular/common/http'; |
||||
|
|
||||
export function getPathName(url: string): string { |
export function getPathName(url: string): string { |
||||
const { pathname } = new URL(url, window.location.origin); |
const { pathname } = new URL(url, window.location.origin); |
||||
return pathname; |
return pathname; |
||||
} |
} |
||||
|
|
||||
|
export class WebHttpUrlEncodingCodec implements HttpParameterCodec { |
||||
|
encodeKey(k: string): string { |
||||
|
return encodeURIComponent(k); |
||||
|
} |
||||
|
|
||||
|
encodeValue(v: string): string { |
||||
|
return encodeURIComponent(v); |
||||
|
} |
||||
|
|
||||
|
decodeKey(k: string): string { |
||||
|
return decodeURIComponent(k); |
||||
|
} |
||||
|
|
||||
|
decodeValue(v: string) { |
||||
|
return decodeURIComponent(v); |
||||
|
} |
||||
|
} |
||||
|
|||||
Loading…
Reference in new issue