Skip to content

DI: bind(Type) should be equivalent to just specifying the Type #1515

@matanlurey

Description

@matanlurey

Example:

bootstrap(MyAppComponent, [
  bind(ShadowDomStrategy).toClass(NativeShadowDomStrategy),
  bind(AwesomeService)
]);

Does not work. It's a little non-intuitive why.

bootstrap(MyAppComponent, [
  bind(ShadowDomStrategy).toClass(NativeShadowDomStrategy),
  AwesomeService
]);

Does work.

Either error should be improved, or bind() (BindingBuilder) should implement Binding interface

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions