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

Method runTransformsOnHtml

packages/angular/ssr/src/app.ts:473–487  ·  view source on GitHub ↗

* Runs the registered transform hooks on the given HTML content. * * @param html - The raw HTML content to be transformed. * @param url - The URL associated with the HTML content, used for context during transformations. * @param preload - An array of URLs representing the JavaScript res

(
    html: string,
    url: URL,
    preload: readonly string[] | undefined,
  )

Source from the content-addressed store, hash-verified

471 * @returns A promise that resolves to the transformed HTML string.
472 */
473 private async runTransformsOnHtml(
474 html: string,
475 url: URL,
476 preload: readonly string[] | undefined,
477 ): Promise<string> {
478 if (this.hooks.has('html:transform:pre')) {
479 html = await this.hooks.run('html:transform:pre', { html, url });
480 }
481
482 if (preload?.length) {
483 html = appendPreloadHintsToHtml(html, preload);
484 }
485
486 return html;
487 }
488}
489
490let angularServerApp: AngularServerApp | undefined;

Callers 1

handleRenderingMethod · 0.95

Calls 3

appendPreloadHintsToHtmlFunction · 0.85
hasMethod · 0.65
runMethod · 0.65

Tested by

no test coverage detected