Modified version of angular resource