-
Notifications
You must be signed in to change notification settings - Fork 26.5k
Closed
Labels
Milestone
Description
Using the same word "binding" for two core ideas of the framework causes some confusion.
Proposal: Rename Binding into Provider, and bindings into providers.
@Component({
providers: [
// the constructor version
new Provider(Http, {toClass: CustomHttp}),
// using builder
provide(Http).viaFactory(customFactory),
// using a different type of builder
provide(Http, {value: customFactory})
]
})
Pros:
- Similar to Angular 1
- Binding means only data-bindings
Cons:
- Different from other DI systems, which mostly use the word binding