title: AngularJS - Controller resource call not passing parameters to service factory?
body: <p>In AngularJS, I'm trying to pass a parameter in a controller call to a service factory. However, I can't seem to get the parameter passed. The function always passes what I set to be the default in the service. And if I don't include the default, it doesn't pass anything.</p>
  
  <p>For example, my code looks similar to:</p>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>...
  Room.enter({room_id: '5'/*$scope.room_id*/}, function(return_data)
      {
          //Callback function stuff.
          ...
      }
  ...
  </code></pre>
  
  <p><strong>Services</strong></p>
  
  <pre><code>...
  services.factory('Room', ['$resource',
      function($resource)
          {
              return $resource('/room/:room_id', {}, {
                      enter: {method: 'PUT', params:{room_id:'-1'}}
          });
      }
  ]);
  ...
  </code></pre>
  
  <p>This way the http resource "/room/-1" is called even though I am trying to pass 5.</p>
  
  <p>If I remove the params part of the "enter" method, then "/room" is all that is called. No params are passed at all.</p>
  
  <p>Any suggestions as to what I'm doing wrong? Thank you much!</p>