Skip to content

feat(context): introduce context events and observers for bind/unbind#2291

Merged
raymondfeng merged 1 commit intomasterfrom
add-context-listener
Feb 12, 2019
Merged

feat(context): introduce context events and observers for bind/unbind#2291
raymondfeng merged 1 commit intomasterfrom
add-context-listener

Conversation

@raymondfeng
Copy link
Copy Markdown
Contributor

@raymondfeng raymondfeng commented Jan 25, 2019

Spin-off from #2122

  • Add support for context to emit bind and unbind events
  • Allow observers to register with the context chain and respond to come and go of bindings of interest

Followed-up PRs:

#2122 (depends on #2291)

  • Introduce ContextView to dynamically resolve values of matching bindings
  • Introduce @inject.view to support dependency injection of multiple bound values
  • Extend @Inject and @inject.getter to support multiple bound values

#2249

  • Add an example package to illustrate how to implement extension point/extension pattern using LoopBack 4’s IoC and DI container

#2259

  • Propose new APIs for Context to configure bindings
  • Add @inject.config to simplify injection of configuration

Checklist

  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • API Documentation in code was updated
  • Documentation in /docs/site was updated
  • Affected artifact templates in packages/cli were updated
  • Affected example projects in examples/* were updated

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature IoC/Context @loopback/context: Dependency Injection, Inversion of Control

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants