microsoft / powerbi-client-angular

Power BI Angular component. This library lets you embed Power BI report, dashboard, dashboard tile, report visual, or Q&A in your Angular application.
Other
131 stars 63 forks source link

Problems in using <powerbi-report> in Angular application having routes with RouteReuseStrategy #19

Open subodhsgod opened 2 years ago

subodhsgod commented 2 years ago

Issue in a nutshell - We are trying explore this library but it's blocking us because it uses iframe to house the report.

Details - Like README.md file mentions, this library/component allows to "embeds" Power BI reports in Angular web application, hence it's using iframe (i.e. to embed). However we are running into problems in consuming it due to usage of iframe.

Just like any standard Angular web application we are using routing in our application. Refer: https://angular.io/guide/routing-overview

Plus, we have Route Reuse Strategy in place, so that routes are not destroyed when user switches between routes Refer: https://angular.io/api/router/RouteReuseStrategy

When we use this component in one of our routes, since it’s not a generating “inline content” (but generates iframe), we see below:

Iframe gets created and destroyed as many times as user switches between routes, degrading overall user experience as:

Questions:

  1. Do you have any ways to address above problems?
  2. Do you have any plans to update this library/component with native Angular implementation?
good-coding-angular commented 2 years ago

Also as a possible consequence of this behaviour when you click the back button in the browser you end up on an empty page.

jaspreet1234567 commented 5 months ago

@good-coding-angular - Did you find the solution to this problem (end up with an empty page when we click on the back button)?