Working on an Angular2 project that involves multiple nested components, I have successfully sent data from a child component to its immediate parent. However, when dealing with three levels of nesting, the question arises: How can I send or modify data across multiple parent components?
For instance, in the scenario depicted above, No 1 represents the message-center component. No 2 is the message-list component which is invoked within No 1 component's HTML using the selector < message-list [messageList]="mails" >.
No 3 portrays a message-detail component, with its parent being No 2. Now, if we delete a selected message from the Inbox within the No 3 component, that message should also be removed from the message-list component (No 2). Furthermore, in the No 1 component, the label "Deleted" should update to "Deleted(1)" as well. How can we propagate this change event to multiple parent components in a two-level nested child component such as No 3?