use angular ngResource service to get the db data