* Gets a map of property names to property values for an element. * * This map includes: * - Regular property bindings (e.g. `[id]="id"`) * - Host property bindings (e.g. `host: { '[id]': "id" }`) * - Interpolated property bindings (e.g. `id="{{ value }}") * * It does not
()
| 175 | * - attribute bindings (e.g. `[attr.role]="menu"`) |
| 176 | */ |
| 177 | get properties(): {[key: string]: any} { |
| 178 | const context = getLContext(this.nativeNode)!; |
| 179 | const lView = context ? context.lView : null; |
| 180 | |
| 181 | if (lView === null) { |
| 182 | return {}; |
| 183 | } |
| 184 | |
| 185 | const tData = lView[TVIEW].data; |
| 186 | const tNode = tData[context.nodeIndex] as TNode; |
| 187 | |
| 188 | const properties: {[key: string]: string} = {}; |
| 189 | // Collect properties from the DOM. |
| 190 | copyDomProperties(this.nativeElement, properties); |
| 191 | // Collect properties from the bindings. This is needed for animation renderer which has |
| 192 | // synthetic properties which don't get reflected into the DOM. |
| 193 | collectPropertyBindings(properties, tNode, lView, tData); |
| 194 | return properties; |
| 195 | } |
| 196 | |
| 197 | /** |
| 198 | * A map of attribute names to attribute values for an element. |
nothing calls this directly
no test coverage detected