One situation is the following where an icon has a click event
<md-list-item *ngFor="let history of exportHistory">
<md-icon (click)="onDownloadClick(history)" md-list-avatar>file_download</md-icon>
<a md-line>{{history.exportDate_epoch | epoch | date:'mediumDate'}}</a>
<p md-line> Exported by: {{history.by}}</p>
<p md-line> {{history.numberOfEntries}} Entries</p>
</md-list-item>
In this scenario, my history object includes a 'url' property with the download link.
When I use the function below, it retrieves the download link.
onDownloadClick(history: ExportHistoryModel) {
console.log(history.url);
}
My objective is to simulate triggering the file download just like clicking on a regular link. Any suggestions?