angular resource snippet updated