MCPcopy Index your code
hub / github.com/angular/angular / init

Function init

modules/benchmarks/src/largeform/ng2/init.ts:17–40  ·  view source on GitHub ↗
(moduleRef: NgModuleRef<AppModule>)

Source from the content-addressed store, hash-verified

15const copies = getIntParameter('copies');
16
17export function init(moduleRef: NgModuleRef<AppModule>) {
18 let app: AppComponent;
19 let appRef: ApplicationRef;
20
21 function destroyDom() {
22 app.setCopies(0);
23 appRef.tick();
24 }
25
26 function createDom() {
27 app.setCopies(copies);
28 appRef.tick();
29 }
30
31 function noop() {}
32
33 const injector = moduleRef.injector;
34 appRef = injector.get(ApplicationRef);
35
36 app = appRef.components[0].instance;
37 bindAction('#destroyDom', destroyDom);
38 bindAction('#createDom', createDom);
39 bindAction('#createDomProfile', profile(createDom, destroyDom, 'create'));
40}

Callers

nothing calls this directly

Calls 3

bindActionFunction · 0.90
profileFunction · 0.90
getMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…