(appRef: ApplicationRef)
| 14 | import {TableComponent} from './table'; |
| 15 | |
| 16 | export function init(appRef: ApplicationRef) { |
| 17 | let table: TableComponent; |
| 18 | |
| 19 | function destroyDom() { |
| 20 | table.data = emptyTable; |
| 21 | appRef.tick(); |
| 22 | } |
| 23 | |
| 24 | function createDom() { |
| 25 | table.data = buildTable(); |
| 26 | appRef.tick(); |
| 27 | } |
| 28 | |
| 29 | function noop() {} |
| 30 | |
| 31 | table = appRef.components[0].instance; |
| 32 | |
| 33 | initTableUtils(); |
| 34 | |
| 35 | bindAction('#destroyDom', destroyDom); |
| 36 | bindAction('#createDom', createDom); |
| 37 | bindAction('#updateDomProfile', profile(createDom, noop, 'update')); |
| 38 | bindAction('#createDomProfile', profile(createDom, destroyDom, 'create')); |
| 39 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…