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

Method isCurrentPathEqualTo

packages/common/src/location/location.ts:123–125  ·  view source on GitHub ↗

* Normalizes the given path and compares to the current normalized path. * * @param path The given URL path. * @param query Query parameters. * * @returns True if the given URL path is equal to the current normalized path, false * otherwise.

(path: string, query: string = '')

Source from the content-addressed store, hash-verified

121 * otherwise.
122 */
123 isCurrentPathEqualTo(path: string, query: string = ''): boolean {
124 return this.path() == this.normalize(path + normalizeQueryParams(query));
125 }
126
127 /**
128 * Normalizes a URL path by stripping any trailing slashes.

Callers 3

setBrowserUrlMethod · 0.45
navigateMethod · 0.45
handleNavigateMethod · 0.45

Implementers 1

SpyLocationpackages/common/testing/src/location_m

Calls 3

pathMethod · 0.95
normalizeMethod · 0.95
normalizeQueryParamsFunction · 0.90

Tested by

no test coverage detected