I am building my first real world Angularjs application. Object Menus is created in services by following code of my boiler plate code
angular.module('mean.system').factory('Menus', ['$resource', function($resource) {
    return $resource('admin/menu/:name', {
        name: '@name',
        defaultMenu: '@defaultMenu'
    });
}]);
How does this work as in all the turorials I have seen http calls are made by explicitly mentioning the url format and type of request like in following
phonecatServices.factory('Phone', ['$resource',
  function($resource){
    return $resource('phones/:phoneId.json', {}, {
      query: {method:'GET', params:{phoneId:'phones'}, isArray:true}
    });
  }]);
 
     
    