MCPcopy Index your code
hub / github.com/angular/angular-cli / stripIndexHtmlFromURL

Function stripIndexHtmlFromURL

packages/angular/ssr/src/utils/url.ts:143–153  ·  view source on GitHub ↗
(url: URL)

Source from the content-addressed store, hash-verified

141 * ```
142 */
143export function stripIndexHtmlFromURL(url: URL): URL {
144 if (url.pathname.endsWith('/index.html')) {
145 const modifiedURL = new URL(url);
146 // Remove '/index.html' from the pathname
147 modifiedURL.pathname = modifiedURL.pathname.slice(0, /** '/index.html'.length */ -11);
148
149 return modifiedURL;
150 }
151
152 return url;
153}
154
155/**
156 * Resolves `*` placeholders in a path template by mapping them to corresponding segments

Callers 3

url_spec.tsFile · 0.90
renderAngularFunction · 0.90
matchMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected