mardi 6 septembre 2016

Emberjs : Configure router to handle direct 'GET' requests

How to configure router to handle xhr and direct requests to api. Use Case : File Download I have a RESTAPI with which i am trying to download a file using an <a> action link tag -> clicking on which resolves to a new Tab/Window with absolute url. My webApp is serving at http://localhost:4200 proxying request to http://localhost:44226 When i try to hit the api to download the file using the url http://localhost:4200/api/download/files/1 I Get the error : UnrecognizedURLError: /api/download/files/1

Default Router

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

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

Any pointers how to proceed/what to change.




Aucun commentaire:

Enregistrer un commentaire