Angular with $resource and REST