DEV Community

Discussion on: Component Communication in Angular (Parent to Child & Child to Parent)

Collapse
 
giacorsa profile image
Gianni

just a question abunhab; $event is a string variable ? what is it ? in this definition
selectedMovieToWatch(data: string) this method takes a tring variable as parameter ... I'm confused :-)

Collapse
 
anubhab5 profile image
Anubhab Mukherjee

$event is the event itself which needs to be passed. Otherwise the event handler will not get the data.