0

i am using django + angularjs + ng-resource to build my resources. the problem of angular removing trailing slashes has been discussed, and i have tried every solution.

this is my current code.

app.factory('Thread', function ($resource) {
    return $resource(
        '/api/thread/:id\\/', {
            id: '@id'
        }, {
            update: {
                method: 'PUT'
            }
        }
    );
});

but when i call the $save method on Thread, this is my debug server logs this

[24/Jul/2013 15:33:39] "POST /api/thread// HTTP/1.1" 404 7341

two slashes. how can i get it have only one slash.

karthikr
  • 97,368
  • 26
  • 197
  • 188
Yousuf Jawwad
  • 3,037
  • 7
  • 33
  • 60

1 Answers1

0

Did you try removing the forward slash before the :id?

J Castillo
  • 3,357
  • 5
  • 27
  • 28