setContext to pass a factory function
Open
Nobody has claimed this yet.
angular
core
web-components
- Dominant language
- TypeScript
- Stars
- 14.4k
- Forks
- 672
- PR merge metrics
- No merged PRs in 30d
Description
it would be great if we could pass a factory function to setContext
setContext(() => createInjector());
setContext(createInjector);
setContext(() => {
return {
get: (token) => inject(token);
};
});
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate setContext and its existing tests, then trace how the current context value is consumed. Compare the requested factory forms, determine the expected behavior for each, and add coverage showing that the supported forms produce the intended context.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100