[英]Can i open a CSV file on click of a link in html using AngularJS?
If i know the absolute path of a CSV file then how can i open the CSV file using AngularJS.Is there any way that i can open it using Excel? 如果我知道CSV文件的绝对路径,那么如何使用AngularJS打开CSV文件。有什么方法可以使用Excel打开它? Currently i am trying this
目前我正在尝试
<a target="_self" ng-href="{{csv_link}}">download csv</a>
But the csv file is not opening. 但是csv文件没有打开。
If you wish to download the CSV file than look at the download attribue of an <a></a>
tag. 如果要下载CSV文件,则可以查看
<a></a>
标记的下载属性。
There's a good example in this answer . 这个答案有一个很好的例子。
And here's mine: 这是我的:
<a target="_self" ng-href="{{csv_link}}" download="optional-custom-name.extension">download csv</a>
EDIT: 编辑:
As it says in the comments (and in the linked answer), this feature is not fully supported. 如评论(和链接的答案)中所述,此功能未得到完全支持。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.