Sibling event communication in Angular 2

后端 未结 1 1460
自闭症患者
自闭症患者 2021-01-15 01:31

I have five components in my project at the time which are

1: AppComponent (Main component)
2: AuthComponent
3: HomeComponent
4: HeaderComponent
5: FooterCom         


        
1条回答
  •  一生所求
    2021-01-15 02:16

    You have to create one common service which shared between your HeaderComponent and AuthComponent and with this service you can communicate between HeaderComponent and AuthComponent. Check Parent and children communicate via a service documentation and my answer for parent-child comunication

    0 讨论(0)
提交回复
热议问题