Add angular factory for socket io