()
| 767 | // parse a segment with its matrix parameters |
| 768 | // ie `name;k1=v1;k2` |
| 769 | private parseSegment(): UrlSegment { |
| 770 | const path = matchSegments(this.remaining); |
| 771 | if (path === '' && this.peekStartsWith(';')) { |
| 772 | throw new RuntimeError( |
| 773 | RuntimeErrorCode.EMPTY_PATH_WITH_PARAMS, |
| 774 | (typeof ngDevMode === 'undefined' || ngDevMode) && |
| 775 | `Empty path url segment cannot have parameters: '${this.remaining}'.`, |
| 776 | ); |
| 777 | } |
| 778 | |
| 779 | this.capture(path); |
| 780 | return new UrlSegment(decode(path), this.parseMatrixParams()); |
| 781 | } |
| 782 | |
| 783 | private parseMatrixParams(): {[key: string]: string} { |
| 784 | const params: {[key: string]: string} = {}; |
no test coverage detected