- Encapsulate "$resource" into factory