Child listens for parent event in Angular 2

前端 未结 4 1166
轮回少年
轮回少年 2020-12-07 16:10

In angular docs there is a topic about listening for child events from parents. That\'s fine. But my purpose is something reverse!. In my app there is an \'admin.component\'

4条回答
  •  粉色の甜心
    2020-12-07 16:50

    For those who are getting Cannot read property 'notifyMe' of undefined

    Try calling the method inside ngAfterViewInit() intead of ngOnInit()

提交回复
热议问题