Closed adamcbuckley closed 5 months ago
Hello, you should ensure that when you are navigating to different pages it is not recreating the embeddingContext each time. The app should call createEmbeddingContext
once and make sure it is not being called multiple times as you navigate away.
const embeddingContext = await createEmbeddingContext(); // ONLY EVER CALL THIS ONCE
const embeddedDashboardExperience = await embeddingContext.embedDashboard(frameOptions, contentOptions);
Hi there,
I'm using Angular 17 and I embed a QuickSight dashboard on one of the pages in my app - everything is working fine. 😊
When I navigate away from the page, the QuickSight DASHBOARD iframe is removed because the parent element is removed by Angular (I believe).
However, I note that the QuickSight CONTROL iframe remains.
When I navigate back to the dashboard page, the dashboard is recreated and I note that I now have 2x QuickSight CONTROL iframes. I also see console messages such as:
Message with unrecognized event target received
My question is: How can I destroy or otherwise clean up the QuickSight embedding stuff when I navigate away from my dashboard page? I plan to show other dashboards throughout the app.
This is my Angular component code FYI: