How do I create an HtmlElement Reference in an Angular component?
问题 I have a component MyNodeComponent that takes a target HTML element as part of the input object in my Angular 7.2.15 : @Component({ selector: 'my-node', templateUrl: './my-node.component.html' }) export class MyNodeComponent implements OnInit, OnChanges, AfterViewInit { @Input() inputObject: [{target: HTMLElement, desc: string}]; ... } The problem is I am not sure how to send an HTML DOM node to target in a dynamic fashion. Especially as there could be multiple instances of MyNode on a page