I am using below code to render my components dynamically –
@for(item of list(); track $index){
<!-- dynamic rendering using ng-container -->
<ng-container *ngComponentOutlet="componentToRender(); inputs: item;" />
}
Is there a way to bind events using any property of ng-container similar to input
?
I have alreay searched the internet and those solutions suggesting to use @ViewChild
but I want to know if any solution exists which uses only templates for event binding.