0

I am building an angular application in which I need to integrate a graph visualization tool. I had made use of HTML <embed> tag to integrate that graph into my application. It works super fine.

What I need is, When I click on the embedded graph, I need to trigger event click on that particular element.

Is that possible ? Do we have an option to perform click action on the third party embedded elements.

I had made use of,

  • jQuery's contain function with find selector,
  • Angular's inbuilt @ViewChild, ElementRef, TemplateRef,
  • Javascript's default document querySelector, querySelectorAll, getElementById..,

No luck, not able to trigger event click.

Is there any alternative that you can suggest ?

Faizul Hassan
  • 120
  • 12

1 Answers1

0

Try to use NgZone in this case. As the click event on the third party element is not being captured by Angular. So its like out of context for Angular and hence this click event will not be considered in the change detection. So to make Angular aware of anything happening outside its context, we need to use NgZone. Refer to https://angular.io/guide/zone#ngzone-1 for more details on this topic.