[FIXED] Display componnant inside PRIME-NG GMap infoWindow


there’s any way to display the component directly inside GMap infoWindow dialogue ?

I want to cahnge this html code (as string) directly by a component


Yes, You can get a reference pointing to that component using ViewChild, like

@ViewChild(ExampleComponent, { read: ElementRef }) exampleComponent: any;

Then you can access its HTML with nativeElement.innerHTML and use it in the infoWindow.setContent function

  handleOverlayClick(event: any) {
    this.infoWindow.open(event.map, event.overlay);

Answered By – בלימי בוימל

Answer Checked By – David Marino (Easybugfix Volunteer)

Leave a Reply

(*) Required, Your email will not be published