I have a modal window component, and I'm inserting the modal content component with transclusion via <ng-content></ng-content>
. I need to call a function in my modal content from the modal component. In this case it's to reset the state of the modal content. How can I get a reference to my modal content so that I can call one of it's functions? Or is there a better way to communicate with my child content component?
UPDATE: I am transcluding different components, so I do need a way to get the reference without knowing what type the transcluded content is.
I've tried several workarounds that I've found, and I'm not having any luck. If someone can provide a plunkr, that would help out a lot.