MCPcopy
hub / github.com/angular/angular / properties

Method properties

packages/core/src/debug/debug_node.ts:177–195  ·  view source on GitHub ↗

* 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

()

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 3

getLContextFunction · 0.90
copyDomPropertiesFunction · 0.85
collectPropertyBindingsFunction · 0.85

Tested by

no test coverage detected