Angular 5 EventEmitter from child to parent component emits undefined

前端 未结 2 1669
[愿得一人]
[愿得一人] 2021-01-19 05:08

I am trying to send a string from a child component to his parent component.

Here is the child :

//imports... 

    @Component({
    s         


        
2条回答
  •  野的像风
    2021-01-19 05:22

    You missed $ prefix of the event. $event is a reserved word, so your data is visible to the event handler in the component markup only with name $event.

    
    

提交回复
热议问题