(path: string)
| 113 | export class AngularJSUrlCodec implements UrlCodec { |
| 114 | // https://github.com/angular/angular.js/blob/864c7f0/src/ng/location.js#L15 |
| 115 | encodePath(path: string): string { |
| 116 | const segments = path.split('/'); |
| 117 | let i = segments.length; |
| 118 | |
| 119 | while (i--) { |
| 120 | // decode forward slashes to prevent them from being double encoded |
| 121 | segments[i] = encodeUriSegment(segments[i].replace(/%2F/g, '/')); |
| 122 | } |
| 123 | |
| 124 | path = segments.join('/'); |
| 125 | return _stripIndexHtml(((path && path[0] !== '/' && '/') || '') + path); |
| 126 | } |
| 127 | |
| 128 | // https://github.com/angular/angular.js/blob/864c7f0/src/ng/location.js#L42 |
| 129 | encodeSearch(search: string | {[k: string]: unknown}): string { |
no test coverage detected