()
| 687 | // parse a segment with its matrix parameters |
| 688 | // ie `name;k1=v1;k2` |
| 689 | private parseSegment(): UrlSegment { |
| 690 | const path = matchSegments(this.remaining); |
| 691 | if (path === '' && this.peekStartsWith(';')) { |
| 692 | throw new RuntimeError( |
| 693 | RuntimeErrorCode.EMPTY_PATH_WITH_PARAMS, |
| 694 | (typeof ngDevMode === 'undefined' || ngDevMode) && |
| 695 | `Empty path url segment cannot have parameters: '${this.remaining}'.`, |
| 696 | ); |
| 697 | } |
| 698 | |
| 699 | this.capture(path); |
| 700 | return new UrlSegment(decode(path), this.parseMatrixParams()); |
| 701 | } |
| 702 | |
| 703 | private parseMatrixParams(): {[key: string]: string} { |
| 704 | const params: {[key: string]: string} = {}; |
no test coverage detected