Skip to content

Instantly share code, notes, and snippets.

@huguogang
Last active May 18, 2016 06:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save huguogang/d2805cc19f463ba8c7545cc206c18fed to your computer and use it in GitHub Desktop.
Save huguogang/d2805cc19f463ba8c7545cc206c18fed to your computer and use it in GitHub Desktop.
this.map.addListener('click',
// Lambdas to the rescue, it will automatically capture this
(e: google.maps.MouseEvent) => {
// Run event handler in Angular Zone, so that change detection will work
this._ngZone.run(() =>
this.mapClick.emit(e.latLng));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment