Is there a way to successfully download a pdf file on click with specific syntax?
<a href = "http://www.pdf995.com/samples/pdf.pdf" download >Click to download!</a>
In the context of a model associated with a <li>
item like below:
<script type="text/x-handlebars" data-template-name="index">
<ul>
{{#each item in model}}
<li {{action action1}}>{{item}}
<a href = "http://www.pdf995.com/samples/pdf.pdf" download >Click to download!</a>
</li>
{{/each}}
</ul>
</script>
The issue arises when trying to make it work inside the <li>
tag which has an action. It seems the action is always called first, causing interference.
Check out this demo for more information.