angular backand $resource