I need help dynamically adding mat-expansion-panel components to my project. Ideally, I would like to add them when a user triggers a function by clicking a button. The ability to add multiple expansion panels as needed is crucial.
My initial attempt involved manually inserting the HTML tag for mat-expansion, which proved to be an incorrect approach as it simply added the tag without integrating the component as intended.