I am trying to add a new icon and possibly a href on the mat-chip component but I want it as properties and not to hardcode into that. So the idea is to have it as a component so I can call it from another component and give data. For example links, and icons are on the left side and right sides. Icons on left should be an edit icon and the right will be default remove. But at the hovering, both of them need to be highlighted. So let's say if from another component we define the left icon then it will be shown and if not then will be not shown. Or can it be done within a directive too?
I have till now created like this but I think I need more to do on that. See stackblitz. Maybe instead of ngIf is any other way to use it. But I want for example that in the child component to send the index so then I can use it into href. But in the child, I cannot use the index so I can iterate through the components and use the href for each of them and I want to use this component for different data. see components in stack blitz. users and group components. 1 of them has a variable name and the other one has a username.
https://stackblitz.com/edit/angular-3vp4xw-a9jeot?file=src/app/chips-autocomplete-example.ts