Here is my code but it is not working. when I click on the map it displays error: Cannot read property 'lat' of undefined
<agm-map
style="height: 700px"
[latitude]="lat"
[longitude]="lng"
[zoom]="zoom"
(mapClick)="placeMarker($event)"
>
Ts file
placeMarker($event) {
console.log($event.coords.lat);
console.log($event.coords.lng);
}```