Emberjs:配置路由器以处理直接'GET'请求

时间:2016-09-07 00:03:08

标签: ember.js ember-cli

如何配置路由器以处理xhrdirect requests到api。

使用案例:文件下载

我有RESTAPI我试图使用<a>操作链接标记下载文件 - &gt;单击解析为具有绝对URL的新选项卡/窗口。 我的webApp正在http://localhost:4200 proxying requesthttp://localhost:44226投放 当我尝试使用网址http://localhost:4200/api/download/files/1点击api下载文件时 我收到错误: 无法识别的BULError:/ api / download / files / 1

默认路由器

const Router = Ember.Router.extend({
  location: config.locationType // auto
});

Router.map(function() {
  this.route('login');
  this.route('logout');
});
export default Router;

任何指示如何继续/改变什么。

0 个答案:

没有答案