I have a problem adding a function-call to html in the AngularJS Controller.
UPDATE: Okay I have to be a little bit more concrete:
My Problem is about a leaflet popup with a button inside. The geojson data loads asynchronous and I have a "onEachFeature" function to add the popup - the function looks like: (IT'S SIMPLIFIED!)
.controller('MapCtrl', function($scope, $state) {
function oef(feature, layer) {
var bounds = layer.getBounds();
var center = bounds.getCenter();
var marker = L.marker(center).addTo(MAP);
var popup = new L.Popup({
autoPan: false,
keepInView: true,
closeButton: false,
offset: new L.point(0, -5)
}).setContent("<div><a ng-click='test()'>"+feature.properties.tooltip + "</a></div>");
}
//LOADING AND ADDING DATA TO MAP
....
//END
$scope.test = function(){
alert("HI");
}
});
Any ideas?
$compile'
? – Asiel Leal Celdeiro 5 mins ago