Closed andygup closed 4 years ago
TL;DR Handling of change detection between the ArcGIS API for JavaScript and Angular components has not been public documented.
ArcGIS API 4.x for JavaScript does have a direct affect on triggering component change detection and the most visible side effect can be performance issues in certain circumstances. There are several well-known approaches to addressing this including ngZone.runOutsideAngular
and manual change detection using ChangeDetectorRef
. The best approach is dependent on the customer's existing architecture.
There are several options for this repo:
Option A: address this discussion in a new wiki here: https://github.com/Esri/angular-cli-esri-map/wiki and leave the current branches "as-is".
Option B: update master
and the arcgis-webpack-angular
branches to reflect one of these approaches.
Option C: create a new branch based on master
that reflects one of these approaches.
Option D: do a combination of Option A and Option B or Option C
I'm leaning towards initially going with Option A since there are some quirks to the two approaches that are touched upon in https://github.com/Esri/esri-loader/issues/234. It would be helpful to get more feedback from the community. And, for example you do incur some technical debt if you go with ChangeDectorRef
reference: https://www.andygup.net/manual-change-detection-in-angular-for-performance/
Reference: https://github.com/Esri/esri-loader/issues/234