Angular @Output & EventEmitter Not Working


Answer :

You should put the showEvent on the actual component selector app-navbar that has the @Output decorator and not on the nav element:

<app-navbar (showEvent)="getToggle($event)"></app-navbar> 

You've got your handler on the wrong element (nav instead of app-navbar)

<app-navbar (showEvent)="getToggle($event)"></app-navbar> 

Comments

Popular posts from this blog

Are Regular VACUUM ANALYZE Still Recommended Under 9.1?

Can Feynman Diagrams Be Used To Represent Any Perturbation Theory?