Event Emission Issue in the ChildComponent (Angular7)
Event Emission Issue in the ChildComponent (Angular7)
I have written a mouseover event for a div in the parentcomponent called ListComponent. I'm calling a method a called enter($event) on mouseover/mouseenter. In the method I have emitted like this this.hovereditem.emit(i)
. In chicldComponent I want to display a delete icon in a row where user hovers each list item . So I have written a function calling of emitted one from the ParentComponent like this
<div (hovereditem) = "enter($event)">
{{x.id}}
</div>
<div >
{{x.desc}}
</div>
IN the ts file ,
enter(event){
alert("event got from parent");
}
But nothing is getting triggered. Response will be highly appreaciated.. Thanks in advance!!!!
Answers
Hi @Lakshmi S ,
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin