Trying to get a Param from this url: /api/events/{id}
$httpBackend.whenGET(/\/api\/events\/(.+)/, undefined, undefined, ['eventID'])
.respond(function(method, url, data, headers, params) {
console.log('get-params: ', params);
return 'test';
});
Also this ist not working for me:
$httpBackend.when('GET', /\/api\/events\/(.+)/).respond...
as of AngularJS httpBackend Documentation (Dynamic responses) this should be working. Am I missing something, or is this a bug?
The Callback is called with the url like: "/api/events/1" but the params allways remain undefinded
.
EDIT: This is to come in AngularJS Version 1.5.0