I have been working on implementing an onclick event for a listview item button. Below is the code snippet that I have tried, but unfortunately the console log is not being triggered when the button is clicked.
I am unsure of what the problem might be in this case.
Here is the HTML file:
<ListView [items]="items" class="list-group">
<ng-template let-item="item">
<GridLayout rows="auto" columns="*, auto">
<Label [nsRouterLink]="['/item', item.id]" [text]="item.name" row="0" col="0" class="list-group-item"> </Label>
<Button text = "Install" tap ="onTap($event)" row="0" col="1" > </Button>
</GridLayout>
</ng-template>
</ListView>
And here is the TypeScript file:
onTap(args: EventData) : void{
let button = <Button>args.object;
console.log("First", "Test");
})
}