title: Angular resource custom url
body: <p>I'm trying to add a simple method on an angular resource, basically like this:</p>
  
  <p><strong>/api/resource/:id/archive</strong></p>
  
  <p>If I do it just like this:</p>
  
  <pre><code>angular.module('myApp')
  .factory('api', function($resource) {
      var api = {
          messages: $resource('/api/messages/:id', {id: '@id'}
          , {
              archive: {
                  method: 'PUT'
                  , params: {id: '@id'}
                  , url: '/api/messages/:id/archive'
              }
          }
      return api;
  })
  .controller('myCtrl', function(api) {
      // once I get messages and do stuff...
      $scope.archive = function(msg) {
          api.messages.archive({id: msg._id}, successHandler, failureHandler);
      }
  });
  </code></pre>
  
  <p>It doesn't work, I get a simple <code>PUT (*/api/messages/{id}*)</code>. I tried it with another param.</p>
  
  <p>In factory:</p>
  
  <pre><code>....
  archive: {
      method: 'PUT'
      , params: {id: '@id', action: '@action'}
      , url: '/api/messages/:id/:action'
  ....
  </code></pre>
  
  <p>In controller:</p>
  
  <pre><code>api.messages.archive({id: msg._id, action: 'archive'} ...)
  </code></pre>
  
  <p>I get the second param as a query param, instead as part of the url.</p>