* Collect all static values after the current `TNode.directiveStylingLast` index. * * Collect the remaining styling information which has not yet been collected by an existing * styling instruction. * * @param tData `TData` where the `DirectiveDefs` are stored. * @param tNode `TNode` which con
( tData: TData, tNode: TNode, isClassBased: boolean, )
| 549 | * @param isClassBased `true` if `class` (`false` if `style`) |
| 550 | */ |
| 551 | function collectResidual( |
| 552 | tData: TData, |
| 553 | tNode: TNode, |
| 554 | isClassBased: boolean, |
| 555 | ): KeyValueArray<any> | null { |
| 556 | let residual: KeyValueArray<any> | null | undefined = undefined; |
| 557 | const directiveEnd = tNode.directiveEnd; |
| 558 | ngDevMode && |
| 559 | assertNotEqual( |
| 560 | tNode.directiveStylingLast, |
| 561 | -1, |
| 562 | 'By the time this function gets called at least one hostBindings-node styling instruction must have executed.', |
| 563 | ); |
| 564 | // We add `1 + tNode.directiveStart` because we need to skip the current directive (as we are |
| 565 | // collecting things after the last `hostBindings` directive which had a styling instruction.) |
| 566 | for (let i = 1 + tNode.directiveStylingLast; i < directiveEnd; i++) { |
| 567 | const attrs = (tData[i] as DirectiveDef<any>).hostAttrs; |
| 568 | residual = collectStylingFromTAttrs(residual, attrs, isClassBased) as KeyValueArray<any> | null; |
| 569 | } |
| 570 | return collectStylingFromTAttrs(residual, tNode.attrs, isClassBased) as KeyValueArray<any> | null; |
| 571 | } |
| 572 | |
| 573 | /** |
| 574 | * Collect the static styling information with lower priority than `hostDirectiveDef`. |
no test coverage detected
searching dependent graphs…