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

Function init

modules/benchmarks/src/largetable/ng2_switch/init.ts:16–42  ·  view source on GitHub ↗
(moduleRef: NgModuleRef<AppModule>)

Source from the content-addressed store, hash-verified

14import {AppModule, TableComponent} from './table';
15
16export function init(moduleRef: NgModuleRef<AppModule>) {
17 let table: TableComponent;
18 let appRef: ApplicationRef;
19
20 function destroyDom() {
21 table.data = emptyTable;
22 appRef.tick();
23 }
24
25 function createDom() {
26 table.data = buildTable();
27 appRef.tick();
28 }
29
30 function noop() {}
31
32 const injector = moduleRef.injector;
33 appRef = injector.get(ApplicationRef);
34 table = appRef.components[0].instance;
35
36 initTableUtils();
37
38 bindAction('#destroyDom', destroyDom);
39 bindAction('#createDom', createDom);
40 bindAction('#updateDomProfile', profile(createDom, noop, 'update'));
41 bindAction('#createDomProfile', profile(createDom, destroyDom, 'create'));
42}

Callers

nothing calls this directly

Calls 4

initTableUtilsFunction · 0.90
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…