used angular $resource