ui-leaflet icon indicating copy to clipboard operation
ui-leaflet copied to clipboard

1.X branch, $rootScope.$new() and marker templates not resulting in unique scopes for each marker

Open mtfurlan opened this issue 7 years ago • 0 comments

Using marker templates, I'm giving each a scope with $rootScope.$new(), and setting the data for each one, but every pin has the same scope in the end.

I expected that $rootScope.$new() would give a new, unique scope each time, and that each pin would have a different message.

http://jsbin.com/gudovohive/edit?html,js,output

(Using $rootScope because I create the pins in a service, this happens with $scope.$new() as well)

The weirdest part is that in that example, both times I've checked two out of three of the pin scopes have the same $scope.$id, yet all three have the same $scope.customMessage.

mtfurlan avatar Sep 26 '16 12:09 mtfurlan