You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 25, 2019. It is now read-only.
The bindMapEvents()-function attaches events to google-maps objects, but it does not handle unbinding when objects are removed (or replaced).
The following use case will cause a memory leak each time setProject() is called.
varmarkers={"firtProject": [/* list of Google Maps markers */],"secondProject": [/* list of Google Maps markers */]};$scope.setProject=function(project){$scope.markers=markers[project];};$scope.markerClicked=function(marker){/* some action */};
<buttonng-click="setProject('firstProject')">Project 1</button><buttonng-click="setProject('secondProject')">Project 2</button><divng-repeat="marker in markers" ui-map-marker="markers[$index]" ui-event="{'map-click': 'markerClicked(marker)'}"></div>
Directive should store unbind markers when they are removed from scope.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The
bindMapEvents()
-function attaches events to google-maps objects, but it does not handle unbinding when objects are removed (or replaced).The following use case will cause a memory leak each time
setProject()
is called.Directive should store unbind markers when they are removed from scope.
The text was updated successfully, but these errors were encountered: