how to add a link through react or vue router to another page in a popup?

445
1
05-20-2022 08:29 AM
FredListy
New Contributor II

how to add a link through react or vue router to another page in a popup?

for example:

      const template = new PopupTemplate({
        content: [
          {
            type: "fields",

            fieldInfos: [
              {
                fieldName: "Test",
              },
            ],
          },
        ],
      });
I already have a different value for each "test". How to add a link for each "test"?
0 Kudos
1 Reply
ReneRubalcava
Frequent Contributor

You can use Popup custom content and programmatically change routes based on what router you're using.

https://developers.arcgis.com/javascript/latest/api-reference/esri-popup-content-CustomContent.html

Something like this, but in the custom popup content.

https://github.com/odoe/nearby-app/blob/main/src/components/common/Footer.vue#L22

0 Kudos