I am trying to follow this Angular tutorial for handling form submissions with promises. I am running my server on node and I'm using express to handle routes. When the form is submitted and I get to the line
var $promise = $http.jsonp('response.json', config)
My application responds by trying to find a route for response.json and then redirects to a 404 page. I then get an Uncaught syntax error because it's trying to parse my jade template as the response.json.
Is the best way to resolve this to define a route for the json response? Or is there something else I'm missing?