Trying to access the remove function from child component(chips-autocomplete-example). But not able to access it in app.component. When i click the close (X) icon, i want to get the value of that. For example, if i click the Apple close icon, i want to get the Apple text in the alert. Same like for others(Lemon, Lime, Orange, Strawberry) I am doing this from the app.component ts file. But not working. How to resolve this?
app.component.ts:
removeClick(removeval) {
alert(removeval);
}
app.component.html:
<chips-autocomplete-example
(removed)="removeClick(fruit)"
></chips-autocomplete-example>
Demo: https://stackblitz.com/edit/angular-sbrx2p-k89gvp?file=app.component.ts