Here is the link of POC on stackblitz.
In above POC I have app component as a root component, app-expansion-panel component as a reusable generic component and custom-expansion-panel directive as a custom directive. In app.component.html I used app-expansion-panel component and in that component I passed mat-slide-toggle using custom-expansion-panel directive. But somehow it is not working.
mat-slide-toggle should work properly.
You are binding a method, and declaring the array inside that same method, so this is what is happening.
These are few easy solutions to the problem