Reputation: 1792
I'm playing some experiments using AngularJS and Leaftlet (I'm new at both of them). I see I can specify some HTML
as markers.bindPopup(...);
parameter. Does anyone tryied to show an AngularJS directive as parameter? I tryed this way whit no success (no surprise) bindPopup(<myDummyDirective></myDummyDirective>)
. I want to show my directive as marker's popup, is there a way to do this?
Upvotes: 2
Views: 515
Reputation: 28638
Use $compile
:
Compiles an HTML string or DOM into a template and produces a template function, which can then be used to link scope and the template together.
$compile('<myDummyDirective></myDummyDirective>')(scope);
See the reference: https://docs.angularjs.org/api/ng/service/$compile
Upvotes: 1