在angularjs和express.js之间下载工作

我可以获取我请求的文件的原始数据,但我无法让浏览器向用户提供文件.我需要使用iframe吗?
//Client code
   download_file: function (path,callback) {
       $http.post('/download/client_file',{path:path}).
           success(function(data,status,headers,config) {
                console.log(data); //this contains the raw data of the res.download 
                                   //from the server.
           });
   }

   //server code
   res.download(file); // the path is proper
我在我的服务文件中使用下面的代码来下载项目,它运行得很好.我从 http://filamentgroup.com/lab/jquery_plugin_for_requesting_ajax_like_file_downloads/开始
$('<form action="'+ url +'" method="'+ ('post') +'">'+inputs+'</form>')
               .appendTo('body').submit().remove();

相关文章

ANGULAR.JS:NG-SELECTANDNG-OPTIONSPS:其实看英文文档比看中...
AngularJS中使用Chart.js制折线图与饼图实例  Chart.js 是...
IE浏览器兼容性后续前言 继续尝试解决IE浏览器兼容性问题,...
Angular实现下拉菜单多选写这篇文章时,引用文章地址如下:h...
在AngularJS应用中集成科大讯飞语音输入功能前言 根据项目...
Angular数据更新不及时问题探讨前言 在修复控制角标正确变...