Add angular factory for resouces.