working ngResource into the application for RESTful interface