Changed call to use the $Resource method.