* Iterates through the property bindings for a given node and generates * a map of property names to values. This map only contains property bindings * defined in templates, not in host bindings.
(
properties: {[key: string]: string},
tNode: TNode,
lView: LView,
tData: TData,
)
| 687 | * defined in templates, not in host bindings. |
| 688 | */ |
| 689 | function collectPropertyBindings( |
| 690 | properties: {[key: string]: string}, |
| 691 | tNode: TNode, |
| 692 | lView: LView, |
| 693 | tData: TData, |
| 694 | ): void { |
| 695 | let bindingIndexes = tNode.propertyBindings; |
| 696 | |
| 697 | if (bindingIndexes !== null) { |
| 698 | for (let i = 0; i < bindingIndexes.length; i++) { |
| 699 | const bindingIndex = bindingIndexes[i]; |
| 700 | const propMetadata = tData[bindingIndex] as string; |
| 701 | const metadataParts = propMetadata.split(INTERPOLATION_DELIMITER); |
| 702 | const propertyName = metadataParts[0]; |
| 703 | if (metadataParts.length > 1) { |
| 704 | let value = metadataParts[1]; |
| 705 | for (let j = 1; j < metadataParts.length - 1; j++) { |
| 706 | value += renderStringify(lView[bindingIndex + j - 1]) + metadataParts[j + 1]; |
| 707 | } |
| 708 | properties[propertyName] = value; |
| 709 | } else { |
| 710 | properties[propertyName] = lView[bindingIndex]; |
| 711 | } |
| 712 | } |
| 713 | } |
| 714 | } |
| 715 | |
| 716 | // Need to keep the nodes in a global Map so that multiple angular apps are supported. |
| 717 | const _nativeNodeToDebugNode = new Map<any, DebugNode>(); |
no test coverage detected
searching dependent graphs…