0

In stable 1.0.7 version all is working perfectly:

Here is my resource (with Rails as backend):

app.factory "Post", ($resource, apiPrefix) ->
  $resource( apiPrefix + "/posts/:id",
    id: "@id"
  ,
    update:
      method: "PUT"
  )

And in all queries it return completely correct hashes.

But when I tried to install version newer than 1.1.0, resource begins to returned hash like this:

post:  { 
    0: <
    1: !
    2: D
    3: O
    4: C
    5: T
    6: Y
    7: P
    8: E
    ...

So, the question is - Why?

gambala
  • 211
  • 2
  • 9

1 Answers1

0

So, problem is done, according this question:

since 1.1.1 version, angular need ".json" affix in each resource url:

app.factory "Post", ($resource, apiPrefix) ->
  $resource( apiPrefix + "/posts/:id.json",
    id: "@id"
  ,
    update:
      method: "PUT"
  )
Community
  • 1
  • 1
gambala
  • 211
  • 2
  • 9