implement angular resource