I have a template:
var template = '<div ng-click="sayHello()">{{text}}</div>'
I compile it with my object with:
var obj = {};
obj.text = "Hello!!!";
obj.sayHello = function(){alert("hi!");};
var angularTemplate = $interpolate(template)(obj);
i add the angularTemplate to my popup. the popup shows with the correct div saying "Hello!!!" ... but when i click it nothing happens,
i also tried to interpolate it again with my scope and place the function in the scope but it doesnt work either.
JS FIDDLE (none) Working demo of what im trying
The "compiled"\"interpolated" html is then transfered to a jquery library to show the html there as a popup.
Please help.
After you guys asking me why im even using interpolate i'll show the other way i have and maybe theres an easier way to solve my problem there: