My api requires a trailing slash for api calls. I was wondering how to pull that off with angular.
So i need to be able to access /tasks/
or a /tasks/xxxx/.
I attempted to do it via:
angular.module('taskServices', ['ngResource']).
factory('Tasks', function($resource){
return $resource('/tasks/:task_id/', {}, {
query: {method:'GET',
params:{},
isArray:true}
});
});
and a
$scope.tasks = Tasks.query();
But it results in a /tasks
or a tasks/xxx
query.
How can i force it to always be /tasks/
and /tasks/xxx/