use angular factory for links