I am facing an issue with processing HTML obtained from a PartialView Ajax call in AngularJS. The complication arises from the fact that some JavaScript code is updating the element.html property after the page has loaded. Unfortunately, I am unable to modify this JavaScript code as it contains more business logic than I am familiar with. Here is a summary of the situation:
MainPage - Angular scope accessible
<dd class="log"></dd>
somefile.js - Not within Angular scope (although MainPage scope can be accessed via JS if required)
getDataTemplate('.log', 'testid');
function getDataTemplate(placeholder, id) {
$.ajax({
type: 'GET',
url: '/Get/Data' + id,
success: function (data, textStatus, xhr) {
var placeHolder = $(placeholder);
placeHolder.html(data);
}
});
};
The data retrieved from "Get/Data" could contain Angular code, for example:
<div>{{1+2}}</div>
I have tried various approaches without success. Any suggestions on how to proceed would be greatly appreciated.
Thank you!