2

This is a very specific question.

All I would like to do is to obtain the URL used by the $resource when it makes calls. For example

var r = $resource('res/:res_id', {res_id: 2});

The reason is that I want access the URL sometimes from an object that is not angular.

I did some googling before coming here. Basically, I need access to the same function that exists here:

https://github.com/angular/angular.js/blob/master/src/ngResource/resource.js

The function is called setUrlParams and it is defined at line 473. If there isn't a public access to this in anyway, I would have to write a function that does the same thing which is not very cool.

Ranjith Ramachandra
  • 10,399
  • 14
  • 59
  • 96

0 Answers0