( tNode: TNode, tView: TView, lView: LView, publicName: string, value: unknown, )
| 728 | * @param value Value to set. |
| 729 | */ |
| 730 | export function setAllInputsForProperty( |
| 731 | tNode: TNode, |
| 732 | tView: TView, |
| 733 | lView: LView, |
| 734 | publicName: string, |
| 735 | value: unknown, |
| 736 | ): boolean { |
| 737 | const inputs = tNode.inputs?.[publicName]; |
| 738 | const hostDirectiveInputs = tNode.hostDirectiveInputs?.[publicName]; |
| 739 | let hasMatch = false; |
| 740 | |
| 741 | if (hostDirectiveInputs) { |
| 742 | for (let i = 0; i < hostDirectiveInputs.length; i += 2) { |
| 743 | const index = hostDirectiveInputs[i] as number; |
| 744 | ngDevMode && assertIndexInRange(lView, index); |
| 745 | const publicName = hostDirectiveInputs[i + 1] as string; |
| 746 | const def = tView.data[index] as DirectiveDef<unknown>; |
| 747 | writeToDirectiveInput(def, lView[index], publicName, value); |
| 748 | hasMatch = true; |
| 749 | } |
| 750 | } |
| 751 | |
| 752 | if (inputs) { |
| 753 | for (const index of inputs) { |
| 754 | ngDevMode && assertIndexInRange(lView, index); |
| 755 | const instance = lView[index]; |
| 756 | const def = tView.data[index] as DirectiveDef<any>; |
| 757 | writeToDirectiveInput(def, instance, publicName, value); |
| 758 | hasMatch = true; |
| 759 | } |
| 760 | } |
| 761 | |
| 762 | return hasMatch; |
| 763 | } |
| 764 | |
| 765 | /** |
| 766 | * Sets an input value only on a specific directive and its host directives. |
no test coverage detected
searching dependent graphs…