You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 27, 2022. It is now read-only.
When a native HTML element matches a @Component selector, the Angular DevTools Components panel lists the component by its native tag name in the component tree, and attributes the component's property values to the native element rather than the matching component class. This can lead to confusion about which component is matching an element, and about where inputs/outputs/properties are coming from.
In the following screenshot, the highlighted node matches an AuthFooterComponent with the selector footer[hamAuthFooter] and a property currentYear. Note how the component is listed as footer in both the component tree and the sidebar. (The link to the component's source code navigates to AuthFooterComponent as expected.)
In the next screenshot, the highlighted link matches both LinkComponent (a[hlLink]) and ExternalLinkDirective (a[target="_blank"]). The element tree only indicates a match for ExternalLinkDirective, and it wouldn't be surprising if someone mistakenly thought that the input and property listed in the sidebar derived from ExternalLinkDirective, when they actually derive from LinkComponent.
Steps to reproduce:
Create a component whose selector matches a native HTML element (e.g., a[myComponent]).
Observe how Angular DevTools represents that component in the Components panel.
The text was updated successfully, but these errors were encountered:
Angular DevTools version (required): 1.0.0
Angular version (required): 9.0.6
Link to a minimal stackblitz reproduction (strongly encouraged):
https://stackblitz.com/edit/angular-devtools-directive-matching
Description of issue:
When a native HTML element matches a
@Component
selector, the Angular DevTools Components panel lists the component by its native tag name in the component tree, and attributes the component's property values to the native element rather than the matching component class. This can lead to confusion about which component is matching an element, and about where inputs/outputs/properties are coming from.In the following screenshot, the highlighted node matches an
AuthFooterComponent
with the selectorfooter[hamAuthFooter]
and a propertycurrentYear
. Note how the component is listed asfooter
in both the component tree and the sidebar. (The link to the component's source code navigates toAuthFooterComponent
as expected.)In the next screenshot, the highlighted link matches both
LinkComponent
(a[hlLink]
) andExternalLinkDirective
(a[target="_blank"]
). The element tree only indicates a match forExternalLinkDirective
, and it wouldn't be surprising if someone mistakenly thought that the input and property listed in the sidebar derived fromExternalLinkDirective
, when they actually derive fromLinkComponent
.Steps to reproduce:
a[myComponent]
).The text was updated successfully, but these errors were encountered: