I want to init a component when I click on div, here is my code
in html file
<li *ngFor="let contact of contactList">
<div (click)="anyFunctionName($event,contact.id)">
</div></li>
<component-selector></component-selector>
in ts file
anyFunctionName(event,id):any{
// I will do some stuff,
and output will be goes to another component html file,
that will call another component <component-selector></component-selector> and display the output there
}
any idea ?
Thanks