* 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)
| 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 | } |
no test coverage detected