问题
I have an angular 6 app that when I run locally on my windows machine works as expected. When I clone the same repo and try to run it on my MAC, I get a browser that just seems to be 'loading' and I dont get any errors in the console.
Angular CLI: 6.0.8
Node: 9.2.0
OS: MAC HIgh Sierra
Angular: 6.0.6
Edit -> I put on console.log statements in my app component and it is hitting the console.log. SO its like the app is loading but it is not rendering even though the browser just looks like its loading
I was able to place a debugger statement to and start to debug. Turns out in zone.js there is a function drainMicroTaskQueue that gets stuck in an infinite for loop. The couple solutions online have to do with routing but Iam not convinced that its my issue
Here is a picture of the dev console on safari: (I removed socket io from my application and I still get the same issue, vendor.js is just in this infinite loading state)
Please and thanks!
回答1:
My application was making an async call infinitely, causing the app to seem to freeze up. It did not freeze on windows, but on any iOS or MAC device it wouldn't load. I removed the call and the app works fine
来源:https://stackoverflow.com/questions/53095017/angular-6-app-zone-js-drainmicrotaskqueue-infinite-loop