title: Angular resource 404 Not Found
body: <p>I've read other posts that have similar 404 errors, my problem is that I can correctly query the JSON data, but can't save without getting this error.</p>
  
  <p>I'm using Angular's <code>$resource</code> to interact with a JSON endpoint. I have the resource object returning from a factory as follows: </p>
  
  <pre><code>app.factory('Product', function($resource) {
          return $resource('api/products.json', { id: '@id' });
  });
  </code></pre>
  
  <p>My JSON is valid and I can successfully use resource's <code>query()</code> method to return the objects inside of my directive, like this:</p>
  
  <pre><code>var item = Product.query().$promise.then(function(promise) {
    console.log(promise) // successfully returns JSON objects
  });
  </code></pre>
  
  <p>However, when I try to save an item that I've updated, using the <code>save()</code> method, I get a 404 Not Found error.</p>
  
  <p>This is the error that I get:</p>
  
  <pre><code>http://localhost:3000/api/products.json/12-34 404 (Not Found)
  </code></pre>
  
  <p>I know that my file path is correct, because I can return the items to update the view. Why am I getting this error and how can I save an item?</p>
  
  <p>Here is my data structure:</p>
  
  <pre><code>[
      {
          "id": "12-34",
          "name": "Greece",
          "path": "/images/athens.png",
          "description": ""
      },
      ...
  ]
  </code></pre>