Injecting deps via token from same file into a scoped Injectable fails #22559
Labels
area: core
Issues related to the framework runtime
core: di
freq3: high
hotlist: components team
Related to Angular CDK or Angular Material
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
type: bug/fix
Milestone
Overview
InjectionToken
defined in some file@Injectable
in that same file that injects a dep via that tokenEasiest workaround is to move the token to another file.
Reproduction
https://github.com/jelbourn/material2/commits/cdk-tree-shakable-services
npm i
gulp test
Generated code (snippet)
Error
Because
LIVE_ANNOUNCER_ELEMENT_TOKEN
isn't referenced off ofexports
, the second part of the code is just trying to reference a nonexistent identifier.The text was updated successfully, but these errors were encountered: