I am unable to find the answer anywhere, hopefully someone can help.
I have an Angular2 click event defined in the template, inside the table's cell:
<td (click)="click2Download()">fileName.txt</td>
In the typescript component, I need help to define a method click2Download() that would automatically start downloading the fileName.txt to client's browser. Note: file is on the same domain, e.g.:
http://example.com/fileName.txt
Any way of doing this with Angular2?