tombatossals / angular-leaflet-directive

AngularJS directive to embed an interact with maps managed by Leaflet library
http://tombatossals.github.io/angular-leaflet-directive
MIT License
1.5k stars 635 forks source link

How to use dynamic IDs ? #1090

Open Vallenain opened 8 years ago

Vallenain commented 8 years ago

I have a random number of maps that I'd like to display and I listen to events for each of them.

So I thought I could dynamically pass an ID to the maps using id="{{}}" or ng-attr-id="{{}}" but it doesn't seem to work. The id attribute is set correctly but it's probably made after the angular-leaflet-directive actually register it.

Here is a jsFiddle with the two cases, if you open the console, you'll be able to see what id is registered. http://jsfiddle.net/9jymzymu/54/

Is this a bug, a design limitation or something I'm misunderstanding ?