DEV Community

Agik Setiawan
Agik Setiawan

Posted on

Angular Material slowly when use large Content Accordion

I have problem when using accordion with large content inside. My case are using nested accordion.

My Solution are using Lazy Rendering with template like below

<mat-expansion-panel>
  <mat-expansion-panel-header>
    This is the expansion title
  </mat-expansion-panel-header>

  <ng-template matExpansionPanelContent>
    Some deferred content
  </ng-template>
</mat-expansion-panel>

Enter fullscreen mode Exit fullscreen mode

https://material.angular.io/components/expansion/overview#lazy-rendering

Top comments (1)

Collapse
 
jeekwar profile image
jeekwar

cool !!!