MCPcopy Index your code
hub / github.com/angular/angular / path

Method path

packages/common/upgrade/src/location_shim.ts:602–615  ·  view source on GitHub ↗
(path?: string | number | null)

Source from the content-addressed store, hash-verified

600 path(): string;
601 path(path: string | number | null): this;
602 path(path?: string | number | null): string | this {
603 if (typeof path === 'undefined') {
604 return this.$$path;
605 }
606
607 // null path converts to empty string. Prepend with "/" if needed.
608 path = path !== null ? path.toString() : '';
609 path = path.charAt(0) === '/' ? path : '/' + path;
610
611 this.$$path = path;
612
613 this.composeUrls();
614 return this;
615 }
616
617 /**
618 * Retrieves a map of the search parameters of the current URL, or changes a search

Callers 2

urlMethod · 0.95
upgrade.spec.tsFile · 0.45

Calls 3

composeUrlsMethod · 0.95
charAtMethod · 0.80
toStringMethod · 0.65

Tested by

no test coverage detected