example rest - using $resource service