Hello,
We found a bug in the 4.0 beta 1 of the ArcGIS Api for JavaScript. Chrome crashes and IE 11 freezes when a AngularJS deferred object is resolved with a MapView instance.
To demonstrate this I created a Plunker. Open the link below and click on ‘Run’.
http://plnkr.co/edit/SqswhEdJUEDsVnDcvshz
I am curious if this is already a known bug by the API for JavaScript team.
With kind regards.
I had a brief moment to debug a little bit; here's some info, if helpful:
I wonder if there's some memory leakage...
Hi,
I've looked into it. View/Map/Layers are Promises too. Seams like $q doesn't like it.
I will come with something.
Thanks for the report and the example!
We looked into it yesterday and we found a related issue in Q: Q fails to detect circular promise chain · Issue #712 · kriskowal/q · GitHub
To validate here's a test with polyfill for Promise that works: JS Bin - Collaborative JavaScript Debugging
I would suggest that you resolve your deferred like so:
mapViewDeferred.resolve({ view: view });