$scope.mapClick = function ($event, $params) {
// I want to get lat / lng from the click event
// However, $params.latLng is undefined.
$scope.mapService.clicked.lat = $params.latLng.lat()
$scope.mapService.clicked.lng = $params.latLng.lng()
// This returns an empty array [ ]
console.log($params)
}
$params should be returning the normal Angular click event data, according to what I'm seeing in the examples here. Why would it be an empty array? I'm using Angular 1.1.5, if that makes a difference.
I have an application set up in this way:
In the HTML, this is set up to call a function on the controller whenever a click event is triggered on the map:
Inside a controller, I have this:
$params should be returning the normal Angular click event data, according to what I'm seeing in the examples here. Why would it be an empty array? I'm using Angular 1.1.5, if that makes a difference.