这是我所拥有的
<div quick-list>
<br quick-link icon='download-alt' href='{{ getDownloadLink(assignment) }}' text="getMessage('assignmentListStudent.attachment.action.download')">
</div>与此相关的函数如下
$scope.getDownloadLink = function(assignment) {
if (!assignment || !assignment.userAttachment || !assignment.userAttachment[0] ) {
return '';
}
return assignment.userAttachment[0].path.replace("equella/items", "equella/force-download/items");
};我不确定这里出了什么问题,但当我单击下载链接的瞬间,我看到页面导航到主页,在那里它应该下载一个现有的文件。这就是我在chrome中看到的。
<li class="quick-link ng-scope" quick-link="" icon="download-alt" href="/community/proxy/equella/force-download/items/71c1f5d5-8a1f-4e85-84d6-7560a9e01b63/1/hanks.tomha.24066.PNG" text="getMessage('assignmentListStudent.attachment.action.download')"><a href="/community/proxy/equella/force-download/items/71c1f5d5-8a1f-4e85-84d6-7560a9e01b63/1/hanks.tomha.24066.PNG" class="ng-binding kb-mode"><i class="icon-download-alt"></i>Download</a></li>现实学生中心(5-15)更新titleInSequence
我有什么地方做错了吗?我应该做些改变吗?任何帮助都将不胜感激。
发布于 2013-09-26 04:50:02
这是因为您的路由器可能会将您重定向到主页。
https://stackoverflow.com/questions/18087902
复制相似问题