Is it possible to use extendModel or extendCollection with a nested route?
e.g.,
http://myserver.com/topresources/nestedresources
Restangular.extendModel('topresources/nestedresources',function(model){ ... })
There's a github issue which references using Restangular.setOnElemRestangularized
with a nested resource by manually handling the nested route... but I would prefer to stick to the normal extendModel/extendCollection methods.
The answer to your question is: No, you cannot use .extendModel()
on a nested resource.
You have given the answer to your question yourself and this seems to be more like a feature request than a concrete question and belongs to the Github issues of Restangular.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With