Open luaks opened 10 years ago
This makes a lot of sense.
I'll implement this!
Thanks for the report — Sent from Mailbox
On Wed, May 28, 2014 at 4:26 AM, Lukas Peleska notifications@github.com wrote:
I think it would be great, if addRestangularMethod would return the Object it is called on. This way pure restangular services with extended methods would get a lot easier to write. instead of this:
js function (Restangular) { var Books = Restangular.all('api/books'); Books.addRestangularMethod('getRandoomBook', 'get', 'random'); return Books; }
You would only have to write this:js function (Restangular) { return Restangular.all('api/books') .addRestangularMethod('getRandoomBook', 'get', 'random'); }
which looks a lot nicer and is a lot cleaner in my oppinion
Reply to this email directly or view it on GitHub: https://github.com/mgonto/restangular/issues/732
Everybody loves chaining!
I think it would be great, if addRestangularMethod would return the Object it is called on. This way pure restangular services with extended methods would get a lot easier to write.
instead of this:
You would only have to write this:
which looks a lot nicer and is a lot cleaner in my oppinion