Closed rajshrimohanks closed 6 years ago
Seeing the same issue ... its not obvious to me how the weak map is not getting initialised
@angular/* :: 5.2.1
@angular/cli :: 1.6.5
I see the same. After some debugging I can see that the field variables are missing once the aot build completes. This means this.draggableMap is undefined. I see the same issue for the outputs in the droppable directive e.g.
over: EventEmitter<any> = new EventEmitter<any>();
When I try to bind to (over) I get an error in my console as over is null. If i add the below to the constructor it fixes the issue.
this.over = new EventEmitter<any>();
but this is not a proper fix, and I have no idea why the fields are getting removed in the aot build.
When i rollback to version v3.1.0 in my package.json i dont get this issue.
@rdavidson
When i rollback to version v3.1.0 in my package.json i dont get this issue.
Can confirm that this doesn't exist in v3.1.0. I'm temporarily rolling back to it. Thanks for the tip.
@rajshrimohanks Yes, we are currently using 3.1.0 and don't see the issue.
Does anyone have an open AOT ready repo that we can look at to help debug this issue?
@Hypercubed Sorry ive nothing I can share ... i will try recreate the issue and share
@Hypercubed - Getting same issue. ng new
and then run in aot can repo it.
v3.1.3 should fix this AOT issue.
I'm submitting a ... (check one with "x")
Current behavior This is my component code:
The drag and drop feature works totally fine when using JIT compilation. However, if I compile via AOT, I get the following error in the browser console when visiting the page:
Expected behavior AOT should work the same way as JIT.
Please tell us about your environment: Angular version: 5.2.0 Typescript version: 2.4.2
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ] all
Language: [all | TypeScript X.X | ES6/7 | ES5] all