mgonto / restangular

AngularJS service to handle Rest API Restful Resources properly and easily
MIT License
7.87k stars 840 forks source link

Changing restangularFields breaks Restangular.service #1262

Open gera2ld opened 9 years ago

gera2ld commented 9 years ago

I tried to add a prefix $ for all Restangular methods by setting restangularFields, as suggested here (https://github.com/mgonto/restangular/issues/675#issuecomment-41151648).

Unfortunately, Restangular.service does not work any more after that, an error occurs instead:

Uncaught TypeError: Expected a function(…)
...
Restangular.all('editor')

The problem due to this seems to be, collection.post and collection.getList are hard coded in function toService, which in my case are changed to collection.$post and collection.$getList.

eprevot commented 9 years ago

Same problem here!

mrahhal commented 7 years ago

This hasn't been fixed yet?

corleyma commented 7 years ago

Any status update here?

bostrom commented 7 years ago

Thanks for the bump. I'll try to take a look at it when I have time. In the meantime, PRs are welcome ;)

corleyma commented 7 years ago

Is this issue substantially different from what was addressed by this PR?: https://github.com/mgonto/restangular/pull/826

mrahhal commented 7 years ago

I already have a working fix for this and lot more issues in my fork here if somebody wants to check. Might do a PR later. (Working with the current state of this project was completely impossible but the fixes were all easy enough)