An angularjs factory that wraps multiple backends