MCPcopy
hub / github.com/angular/angular-cli / match

Method match

packages/angular/ssr/src/routes/router.ts:85–92  ·  view source on GitHub ↗

* Matches a request URL against the route tree to retrieve route metadata. * * This method strips 'index.html' from the URL if it is present and then attempts * to find a match in the route tree. If a match is found, it returns the associated * route metadata; otherwise, it returns `unde

(url: URL)

Source from the content-addressed store, hash-verified

83 * @returns The metadata for the matched route or `undefined` if no match is found.
84 */
85 match(url: URL): RouteTreeNodeMetadata | undefined {
86 // Strip 'index.html' from URL if present.
87 // A request to `http://www.example.com/page/index.html` will render the Angular route corresponding to `http://www.example.com/page`.
88 let { pathname } = stripIndexHtmlFromURL(url);
89 pathname = stripMatrixParams(pathname);
90
91 return this.routeTree.match(pathname);
92 }
93}

Callers 15

getEOLFunction · 0.45
index_spec.tsFile · 0.45
applyMethod · 0.45
_compileMethod · 0.45
findDomainStringFunction · 0.45
getMethod · 0.45
getMethod · 0.45
fileMatchExistsMethod · 0.45
constructorMethod · 0.45
renameTemplateFilesFunction · 0.45

Calls 2

stripIndexHtmlFromURLFunction · 0.90
stripMatrixParamsFunction · 0.90

Tested by

no test coverage detected