title: How do I add a custom method to a restangular service?
body: <p>I have a decoupled Restangular service which I'd like to attach a custom method to. It appears that the only methods returned on a collection by default are <code>getList</code>, <code>one</code>, and <code>post</code>. I would like to do <code>Locations.getLongLat()</code></p>
  
  <p>I have tried adding the following to my service with no luck (the method isn't bound to the object) and I just get <code>undefined is not an object</code> in response.</p>
  
  <pre><code>angular.module('myApp')
  .factory('Locations', function (Restangular) {
  
      return Restangular.withConfig(function (RestangularConfigurer) {
          RestangularConfigurer.addElementTransformer('api/v1/locations', true, function (location) {
              location.addRestangularMethod('getLongLat', 'get', 'longlat');
              return location;
          });
      }).service('api/v1/locations');
  })
  </code></pre>
  
  <p>Anyone have any ideas?</p>