Answer the question
In order to leave comments, you need to log in
Passing an event from ng-content to parent component?
There is a parent component with ng-content inside. Other directives are inserted into ng-content. How to transfer an event to a parent directive from directives inside without applying (event) to a view?
<parent-component>
<child-component></child-component>
<child-component></child-component>
</parent-component>
Answer the question
In order to leave comments, you need to log in
There are many recipes,
one of them is to inject the parent component into the child
https://plnkr.co/edit/y7tRG625BsNIRdmIaGrY?p=preview
More options you can find here https://angular.io/docs/ts/latest/cookbook/ compone...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question