Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I use Restangular.extendModel or extendCollection with a nested resource route?

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.

like image 815
bendalton Avatar asked Jun 09 '14 13:06

bendalton


1 Answers

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.

like image 131
fdomig Avatar answered Oct 06 '22 11:10

fdomig