DEV Community

Agik Setiawan
Agik Setiawan

Posted on

3

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 !!!

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay