Files
main.tsmain
What you'll learn
- Declare DEFAULT, REQUEST and TRANSIENT scope, and predict how many instances the container creates
- Inject the current request into a request-scoped provider with the REQUEST token, and explain why scope bubbles up
- Inject INQUIRER into a transient provider to learn which class owns it
Press Run tests to start the app. Its log appears here.Graded endpoints
A request-scoped context built from this request's header; the service is the one singleton
A new context instance for a new request; the same service instance
Third request, third context, and the fallback id
Transient: StatsController received its own Tagger, told through INQUIRER who owns it