You can use the Output() decorator to emit an event from a child component so that the parent component can catch it. I need to catch the event emitted by any child component that is not necessarily the direct descendant of this component.
Let ComponentTwo be the component that emits the event. If the application has the following structure: App -> ComponentTwo , we can easily catch the event emitted by ComponentTwo . But if we look at a structure like App -> ComponentOne -> ComponentTwo , we cannot catch the emitter directly.
Here is a plunker that illustrates the problem.
So, is there a way to sort the propagation event in all parent components? Thanks.
angular
nakajuice
source share