* Apply OpCodes associated with updating an existing ICU. * * @param tView Current `TView` * @param tIcu Current `TIcu` * @param bindingsStartIndex Location of the first `ɵɵi18nApply` * @param lView Current `LView`
(tView: TView, tIcu: TIcu, bindingsStartIndex: number, lView: LView)
| 502 | * @param lView Current `LView` |
| 503 | */ |
| 504 | function applyIcuUpdateCase(tView: TView, tIcu: TIcu, bindingsStartIndex: number, lView: LView) { |
| 505 | ngDevMode && assertIndexInRange(lView, tIcu.currentCaseLViewIndex); |
| 506 | let activeCaseIndex = lView[tIcu.currentCaseLViewIndex]; |
| 507 | if (activeCaseIndex !== null) { |
| 508 | let mask = changeMask; |
| 509 | if (activeCaseIndex < 0) { |
| 510 | // Clear the flag. |
| 511 | // Negative number means that the ICU was freshly created and we need to force the update. |
| 512 | activeCaseIndex = lView[tIcu.currentCaseLViewIndex] = ~activeCaseIndex; |
| 513 | // -1 is same as all bits on, which simulates creation since it marks all bits dirty |
| 514 | mask = -1; |
| 515 | } |
| 516 | applyUpdateOpCodes(tView, lView, tIcu.update[activeCaseIndex], bindingsStartIndex, mask); |
| 517 | } |
| 518 | } |
| 519 | |
| 520 | /** |
| 521 | * Apply OpCodes associated with switching a case on ICU. |
no test coverage detected
searching dependent graphs…