angular.dart icon indicating copy to clipboard operation
angular.dart copied to clipboard

Circular dependency error if root context depends on Http service

Open ewot opened this issue 10 years ago • 0 comments

If the root context depends on the Http service (direct or indirect) an circular dependency error is thrown:

Cannot resolve a circular dependency! (resolving DirectiveMap -> DirectiveSelectorFactory -> ElementBinderFactory -> ComponentFactory -> ShadowDomComponentFactory -> ViewFactoryCache -> Http -> RootScope -> Object -> Http)

To reproduce:

@Injectable()
class MyRootContext {
  MyRootContext(Http http);
}

applicationFactory()
  .rootContextType(MyRootContext)
  .run();

ewot avatar Jan 31 '15 22:01 ewot