MCPcopy Create free account
hub / github.com/angular/angular / parseParam

Method parseParam

packages/router/src/url_tree.ts:791–807  ·  view source on GitHub ↗
(params: {[key: string]: string})

Source from the content-addressed store, hash-verified

789 }
790
791 private parseParam(params: {[key: string]: string}): void {
792 const key = matchMatrixKeySegments(this.remaining);
793 if (!key) {
794 return;
795 }
796 this.capture(key);
797 let value = '';
798 if (this.consumeOptional('=')) {
799 const valueMatch = matchSegments(this.remaining);
800 if (valueMatch) {
801 value = valueMatch;
802 this.capture(value);
803 }
804 }
805
806 setUrlDerivedKey(params, decode(key), decode(value));
807 }
808
809 // Parse a single query parameter `name[=value]`
810 private parseQueryParam(params: Params): void {

Callers 1

parseMatrixParamsMethod · 0.95

Calls 6

captureMethod · 0.95
consumeOptionalMethod · 0.95
matchMatrixKeySegmentsFunction · 0.85
matchSegmentsFunction · 0.85
setUrlDerivedKeyFunction · 0.85
decodeFunction · 0.70

Tested by

no test coverage detected