( tNode: TNode, tView: TView, lView: LView, publicName: string, value: unknown, )
| 747 | * @param value Value to set. |
| 748 | */ |
| 749 | export function setAllInputsForProperty( |
| 750 | tNode: TNode, |
| 751 | tView: TView, |
| 752 | lView: LView, |
| 753 | publicName: string, |
| 754 | value: unknown, |
| 755 | ): boolean { |
| 756 | const inputs = tNode.inputs?.[publicName]; |
| 757 | const hostDirectiveInputs = tNode.hostDirectiveInputs?.[publicName]; |
| 758 | let hasMatch = false; |
| 759 | |
| 760 | if (hostDirectiveInputs) { |
| 761 | for (let i = 0; i < hostDirectiveInputs.length; i += 2) { |
| 762 | const index = hostDirectiveInputs[i] as number; |
| 763 | ngDevMode && assertIndexInRange(lView, index); |
| 764 | const publicName = hostDirectiveInputs[i + 1] as string; |
| 765 | const def = tView.data[index] as DirectiveDef<unknown>; |
| 766 | writeToDirectiveInput(def, lView[index], publicName, value); |
| 767 | hasMatch = true; |
| 768 | } |
| 769 | } |
| 770 | |
| 771 | if (inputs) { |
| 772 | for (const index of inputs) { |
| 773 | ngDevMode && assertIndexInRange(lView, index); |
| 774 | const instance = lView[index]; |
| 775 | const def = tView.data[index] as DirectiveDef<any>; |
| 776 | writeToDirectiveInput(def, instance, publicName, value); |
| 777 | hasMatch = true; |
| 778 | } |
| 779 | } |
| 780 | |
| 781 | return hasMatch; |
| 782 | } |
| 783 | |
| 784 | /** |
| 785 | * Sets an input value only on a specific directive and its host directives. |
no test coverage detected