为什么我无法以角度js导出文件 [英] Why I am unable to export the file in angular js

查看:120
本文介绍了为什么我无法以角度js导出文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在html中使用它时,这段代码正常工作。

但是当我使用相同的angularJS代码时,它给我404错误,



为什么我无法从桌面导出文件。



有人有意,请建议我。



This code is proper working when i am using it into the html.
But when i use the same code for angularJS it giving me 404 error,

Why i am unable to export the file from my desktop.

someone have idea please suggest me.

<tr>
                       <th>Country</th>
                       <th>VARCHAR</th>
                       <th>40</th>
                       <td><a class="btn btn-primary" href="Region Map.xlsx" target="_blank">Download_Region</a></td>
                           </tr>
                   <tr>
                       <th> Region</th>
                       <th>VARCHAR</th>
                       <th>45</th>

推荐答案

我认为这是因为有角度的路由。尝试使用绝对网址,例如http://www.mypage.com/sub/file.xlsx,如果有效,请找出适合您范围的网址。
I think it is because of routing in angular. Try to use absolute url, like http://www.mypage.com/sub/file.xlsx and if that works figure out the correct url for your scope.


这篇关于为什么我无法以角度js导出文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆