ngFor Not Updating

@finke Thanks for the confirmation!

In such case there is not much that you can do, other that using the zone.run() workaround. I would recommend you to use NgZone and to add comments about the workaround. Something like this (so that you can find it and remove it once the issue is fixed):

// ...
  constructor(private _zone: NgZone) {
  }

  onGetNear() {
    //..
    this._dataService.nearbySearch(req).subscribe(res => {
      // HACK: Workaround for a bug in zone.js (0.6.12):
      // https://github.com/angular/zone.js/issues/304
      this._zone.run(() => this.places = res);
    });
  }
// ...

You could also vote for the zone.js bug so that it hopefully get fixed sooner:

1 Like