javascript - How to dynamically pass params into a click event method in angular 2 -
my service returns data , use view. i'm trying pass specific id ondivclick method on click event.
i want it's not working :
<div *ngfor="let d of data" class="widget-body no-padding"> <a class="list-group-item" href="#" (click)="ondivclick({{d.data_id}})"> ... </a> </div> any ideas ?
just remove {{}}
<a class="list-group-item" href="#" (click)="ondivclick(d.data_id)"> if have () or [] must not use {{}} well
Comments
Post a Comment