angular-gm icon indicating copy to clipboard operation
angular-gm copied to clipboard

ng-click in an info window not firing

Open gmuirhead opened this issue 11 years ago • 2 comments

After updating to the latest build (1.0) I have noticed that ng-clicks on the info window have stopped working.

I have modified the info window example fiddler to include an ng-click as follows:

{{selectedVolcano.name}}

{{selectedVolcano.elevationMeters}}m

Any ideas or thoughts would be helpful.

Thanks, Gregory

gmuirhead avatar Jan 09 '14 17:01 gmuirhead

I have found the cause, due to teh DOM objects getting removed and replaced with the empty DIV, the note regarding compilation is helpful but it would have been helpful further for the directive to offer that as an optional parameter for folks.

gmuirhead avatar Jan 09 '14 19:01 gmuirhead

A workaround that I found. It access the $scope from outside.

$(document).on('click','.report', function(e){ e.preventDefault(); var scope = angular.element($(".content")).scope(); scope.$apply(function(){ scope.reportSpot(); }) });

thmelo avatar Apr 19 '14 19:04 thmelo