How do I evaluate a template, recevied via AJAX?
Let's say I have a directive, that sets a click-listener to its host element, so on click it makes an ajax-call, receives some angular-based template, evaluates it, and shows some modal popup?
The main problem is that as a client, I dont exactly know what template to fetch, the server handles that, based on received parameters
$http.post( '... url ...' , {
'param': value,
...
}).success(function (ans) {
// evaluate and create popup here
});
Thanks in advance!