fix(core): ensure all initializer functions run in an injection context#54761
fix(core): ensure all initializer functions run in an injection context#54761crisbeto wants to merge 1 commit intoangular:mainfrom
Conversation
fbfb314 to
493b515
Compare
There was a problem hiding this comment.
I had to rework these tests, because they were instantiating components manually.
devversion
left a comment
There was a problem hiding this comment.
LGTM. Only would optionally suggest TestBed.runInInjectionContext for shorter tests
There was a problem hiding this comment.
TestBed.runInInjectionContext(() => input(0)) also works and is shorter.
There was a problem hiding this comment.
Good point, I'll change the input tests but will keep the query tests as they are since they're kinda tied to a view.
Ensures that all of the functions intended to be run in initializers are in an injection context. This is a stop-gap until we have a compiler diagnostic for it.
493b515 to
31bfdb3
Compare
|
Blocked on reworking internal targets that are using the functions incorrectly. |
|
Passing TGP, excluding some flakes and after I land a separate cleanup CL. |
|
This PR was merged into the repository by commit 018f826. |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Ensures that all of the functions intended to be run in initializers are in an injection context. This is a stop-gap until we have a compiler diagnostic for it.