Closed
Description
Bug Report
Zone.js is incorrectly patching Lightning Web Components hooks when using those within an Angular project.
Description
Using Lightning Web Components in Angular project leads to an exception that comes out of Zone.js. It is trying to patch a attributeChangedCallback in LWC. The name of the method is patchCallbacks
Minimal Reproduction
- Create a sample LWC and add it your Angular Project either as resource or as part of the build. Once you start the server you will see the error.
Exception or Error
Uncaught TypeError: Cannot assign to read only property 'attributeChangedCallback' of object '[object HTMLElement]'
at zone.js:2163
at Array.forEach ()
at CustomElementRegistry.target. [as define] (zone.js:2147)
Your Environment
Angular Version:
Angular CLI: 12.0.3
Node: 14.15.1
Package Manager: npm 7.9.0
OS: darwin x64
Angular: 12.0.4
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1200.3
@angular-devkit/build-angular 12.0.3
@angular-devkit/core 12.0.3
@angular-devkit/schematics 12.0.3
@angular/cli 12.0.3
@schematics/angular 12.0.3
rxjs 6.6.7
typescript 4.2.4