-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Closed
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: coreIssues related to the framework runtimeIssues related to the framework runtimecore: dicore: dynamic view creationstate: has PRtype: bug/fix
Milestone
Description
Which @angular/* package(s) are the source of the bug?
core, forms
Is this a regression?
No
Description
In my code, I was injecting some providers when calling createComponent() method of ViewContainerRef. It worked well.
But after upgrading Angaulr version from 13.1 to 13.2, I got 'Cannot inject Renderer2 when the application uses Renderer3!' error .
The code works well if I remove the options for createComponent() method, however, I don't want to remove that.
Please help with this issue 😭
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
core.mjs:6468 ERROR Error: Cannot inject Renderer2 when the application uses Renderer3!
at getOrCreateRenderer2 (core.mjs:21014:1)
at injectRenderer2 (core.mjs:21025:1)
at Renderer2.__NG_ELEMENT_ID__ (core.mjs:21009:1)
at getOrCreateInjectable (core.mjs:3383:1)
at Module.ɵɵdirectiveInject (core.mjs:14389:1)
at NodeInjectorFactory.DefaultValueAccessor_Factory [as factory] (forms.mjs:254:1)
at getNodeInjectable (core.mjs:3548:1)
at searchTokensOnInjector (core.mjs:3485:1)
at getOrCreateInjectable (core.mjs:3429:1)
at ɵɵdirectiveInject (core.mjs:14389:1)
defaultErrorLogger @ core.mjs:6468
handleError @ core.mjs:6515
handleError @ core.mjs:10940
executeListenerWithErrorHandling @ core.mjs:14963
wrapListenerIn_markDirtyAndPreventDefault @ core.mjs:14998
(익명) @ platform-browser.mjs:466
invokeTask @ zone.js:406
onInvokeTask @ core.mjs:25459
invokeTask @ zone.js:405
runTask @ zone.js:178
invokeTask @ zone.js:487
invokeTask @ zone.js:1600
globalZoneAwareCallback @ zone.js:1626
Please provide the environment you discovered this bug in (run ng version)
Angular CLI: 13.2.0
Node: 14.17.0
Package Manager: npm 6.14.13
OS: win32 x64
Angular: 13.2.0
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1302.0
@angular-devkit/build-angular 13.2.0
@angular-devkit/core 13.2.0
@angular-devkit/schematics 13.2.0
@schematics/angular 13.2.0
rxjs 7.4.0
typescript 4.5.5
Anything else?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: coreIssues related to the framework runtimeIssues related to the framework runtimecore: dicore: dynamic view creationstate: has PRtype: bug/fix
