MyModel.remoteMethod(
'install',
{
accepts: [
{arg: 'foo', type: 'string'}
],
description: 'install new foo,
returns: {arg: 'results', type: 'object',root: true},
http: {path: '/install/:foo', verb: 'put'}
});
module.factory(
"MyModel",
['LoopBackResource', 'LoopBackAuth', '$injector', function(Resource, LoopBackAuth, $injector) {
var R = Resource(
urlBase + "/MyModel/:id",
{ 'id': '@id' },
[snip]
/**
* @ngdoc method
* @name lbServices.MyModel#install
[snip]
"install": {
url: urlBase + "/MyModel/install/:foo",
method: "PUT"
},
MyModel.install({foo: "something"}).$promise.then(function(err,result) {
console.log(err,result)
})
PUT https://myUrl/apiMyModel/install 404 (Not Found)
"This method does not accept any data. Supply an empty object."
- lb-services.js