How to add Angular component selectors or routers in PopupTemplate?

465
1
04-26-2022 10:13 AM
KrishnakanthYachareni
New Contributor II

Hi,

I was trying to add the angular component selectors and angular router in PopupTemplate content. But it is not working, after searching some information on the web that  PopupTemplate content only supports a few HTML tags.

So my issue is how to call angular components from the PopupTemplate? Could anyone please help here?

KrishnakanthYachareni_1-1650993142712.png

 

 

0 Kudos
1 Reply
AndyGup
Esri Regular Contributor

Hi @KrishnakanthYachareni  correct I don't think that will work, here is the documentation: https://developers.arcgis.com/javascript/latest/api-reference/esri-PopupTemplate.html#content. Since the Popup content is created on-the-fly, I wouldn't expect the Angular component code to run correctly since it's occurring outside of the Angular component life-cycle. I'm not sure how this works in Ivy, you used to use the EventManager approach to run outside of NgZone. https://angular.io/api/platform-browser/EventManager.

0 Kudos