MCPcopy
hub / github.com/angular/angular / render

Function render

modules/ssr-benchmarks/src/main.server.ts:24–39  ·  view source on GitHub ↗
(DISABLE_DOM_EMULATION: boolean = false)

Source from the content-addressed store, hash-verified

22 * (But won't prevent the monkey patching of DOM apis as this is introduced by the CLI)
23 */
24const render = (DISABLE_DOM_EMULATION: boolean = false) => {
25 ɵenableProfiling();
26
27 let doc: Document | string;
28 if (DISABLE_DOM_EMULATION) {
29 doc = document.implementation.createHTMLDocument('');
30 doc.body.innerHTML = '<app-root></app-root>';
31 } else {
32 doc = '<html><head></head><body><app-root></app-root></body></html>';
33 }
34
35 return renderApplication(bootstrap, {
36 document: doc,
37 platformProviders: [{provide: ɵENABLE_DOM_EMULATION, useValue: !DISABLE_DOM_EMULATION}],
38 });
39};
40
41export {render};
42

Callers 2

benchmarkRunFunction · 0.90
_createTreeMethod · 0.85

Calls 1

renderApplicationFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…