Await doesn't work in Angular project
rkristof opened this issue · 2 comments
rkristof commented
I tried using await and promises in an Angular 16 project, but it always fails with the following error:
Error: [string "..."]:3: attempt to call a nil value (method 'await')
I executed the same Lua code using vanilla JS and Vue, and it worked in both cases.
I created a minimal reproduction where you can check it: link
rkristof commented
I did some testing and realized that the reason why it's not working in Angular is because of Zone.js. I'm guessing the difference is in the inner workings of the ZoneAwarePromise object. When I disabled NgZone for the project, the promises started to work.
ceifa commented
Fixed on 1.15.1