How to display alert on app level from a child component
问题 I would like to have some rules or suggestions to be able to do this: I have an alert on app level that I want to show when something is happening on one of my components (ex: Saving information has succeeded or failed). Also, how can I send the different text I want to show? Is there any equivalent of @ViewChild? Thanks for your help 回答1: I would do it with Observable and Subject . Basically you need a service injected in the shared module of those component so they share state. The app