Download 同一文件获得下载,有多个文件

Download 同一文件获得下载,有多个文件,download,Download,我正在尝试使用angular js逐个下载文件。当我单击第一个文件时。它可以下载。如果单击“下一个文件”,它将下载相同的第一个文件。这两个文件放在同一个文件夹中 我曾接触过一些人,但没有使用,因为他们只下载了1个文件 <a id="tbFileExport" style="display: none" href="{{repairEstimate.filePath}}/repairEstimate.fileName}}" download="{{repairEstimate.fil

我正在尝试使用angular js逐个下载文件。当我单击第一个文件时。它可以下载。如果单击“下一个文件”,它将下载相同的第一个文件。这两个文件放在同一个文件夹中

我曾接触过一些人,但没有使用,因为他们只下载了1个文件

<a id="tbFileExport" style="display: none"  href="{{repairEstimate.filePath}}/repairEstimate.fileName}}"    download="{{repairEstimate.fileName}}"></a>
<div ng-if="repairEstimate.estimateRepairNo!=''" style="padding-top: 9px;">                                      <a data-ng-click="downloadFile()"                                          style="color: green">{{repairEstimate.fileName}}</a>

In angularjs

 $scope.downloadFile = function() {
            $("#tbFileExport").bind('click', function() {
            });
            $('#tbFileExport').simulateClick('click');
        }

        $.fn.simulateClick = function() {
            return this.each(function() {
                if ('createEvent' in document) {
                    var doc = this.ownerDocument, evt = doc
                            .createEvent('MouseEvents');
                    evt.initMouseEvent('click', true, true,
                            doc.defaultView, 1, 0, 0, 0, 0, false,
                            false, false, false, 0, null);
                    this.dispatchEvent(evt);
                } else {`enter code here`
                    this.click();
                }
            });

{{repairEstimate.fileName}
在angularjs
$scope.downloadFile=函数(){
$(“#tbFileExport”).bind('click',function(){
});
$('tbFileExport')。模拟单击('click');
}
$.fn.simulateClick=函数(){
返回此值。每个(函数(){
如果(文档中的“createEvent”){
var doc=this.ownerDocument,evt=doc
.createEvent(“MouseEvents”);
evt.initMouseEvent('click',true,true,
doc.defaultView,1,0,0,0,0,false,
false,false,false,0,null);
本次调度事件(evt);
}else{`在这里输入代码`
这个。单击();
}
});