angularuser-interfaceangular-materialmat-expansion-panel

How to expand mat-expansion-panel based on-click button in angular?


I have a component with expansion panels, and now, On-clicking of All tab button, in the below body part all the mat-expansion-panel is expanding perfectly, and what i am expecting is: if we click on the B tab it should be active and B alphabet mat-expansion-panel only needs to expand, and on-click of C tab it should be active and c alphabet mat-expansion-panel only needs to expand. Based on the "alphabet and on-click tab" it should expand.

StackBlitz


Solution

  • I have modified your code. You can check this mat-expansion example link