(lView: LView, onDestroyCallback: () => void)
| 283 | * Stores a LView-specific destroy callback. |
| 284 | */ |
| 285 | export function storeLViewOnDestroy(lView: LView, onDestroyCallback: () => void) { |
| 286 | if (isDestroyed(lView)) { |
| 287 | throw new RuntimeError( |
| 288 | RuntimeErrorCode.VIEW_ALREADY_DESTROYED, |
| 289 | ngDevMode && 'View has already been destroyed.', |
| 290 | ); |
| 291 | } |
| 292 | if (lView[ON_DESTROY_HOOKS] === null) { |
| 293 | lView[ON_DESTROY_HOOKS] = []; |
| 294 | } |
| 295 | lView[ON_DESTROY_HOOKS].push(onDestroyCallback); |
| 296 | } |
| 297 | |
| 298 | /** |
| 299 | * Removes previously registered LView-specific destroy callback. |
no test coverage detected
searching dependent graphs…