I have mat accordion in which I am dynamically creating expansion panels and its content components
<mat-accordion>
<Mat-expansion-panel ngfor>
<Header>
<Custom component with some input for api call>
I want to render and call api inside custom component only when expansion panel is expanded.
Currently api is getting called for each panel even if it is close.