|148253||Oct 11,2019 11:58 AM UTC||Oct 16,2019 11:58 AM UTC||Angular - EJ 2||5|
When I add items in scorecards array, new e-panel is not being rendered.<e-panel *ngFor="let scorecard of scorecards" [col]="scorecard.col" [row]="scorecard.row" [sizeX]="scorecard.sizeX" [sizeY]="scorecard.sizeY" [id] = "scorecard.id.toString()">
<ng-template #content >
<app-scorecard (closed)="closedTab(scorecard.id)" [id]="scorecard.id">app-scorecard>
ng-template>e-panel>I verified that it is rendered issue by wrapping ejs-dashboardlayout in a div and using *ngIf to hard refresh the component, it worked that way.Is this a bug, or am I missing something? Thanks in advance.
Thank you for your reply and sample application. Please find my concerns below.
I see you are rendering the whole dashboard layout component whenever a new item is pushed to the scoreboard1. This is exactly what I am trying to avoid (performance reasons). I was able to achieve similar using *ngIf.
What my question is => Why the angular change detection does not kick off for dashboard layout component when a new item is pushed to scoreboard1? If I wrap my app-scorecard inside a div and use *ngFor on that div, then my component is rendered whenever I push an item on the array. The change detection kicks off.
Is there any alternative to this, so that I do not need to re-render the whole dashboard layout component each time I add a new item to the array?
The solution, however, looks like a work around rather than the optimal solution.
Is the current behavior of dashboard layout component not rendering new component on pushing item to array intended?
Is there any feature on pipeline to support dynamic component rendering using the method like addPanel()?
Anyway thank you very much for your assistance and a great library.
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.