I'm trying to display some XML as is in an $mdDialog using Angular Material. If I display it using a standard alert, I see the XML as I'd expect, but $mdDialog or Angular is stripping all of the tags from it.
Here's the code. Neither of the commented out lines make a difference as far as the XML is concerned.
function displayFile(data, fieldName) {
var content = eval("data." + fieldName);
alert(content);
if (content) {
//content = $sanitize(content);
//content = $sanitize("<code>" + content + "</code>");
} else {
content = fieldName + " does not contain any content.";
};
var myAlert = $mdDialog.alert({
title: data.FILE_NAME,
content: content,
ok: 'Close'
});
$mdDialog
.show(myAlert)
.finally(function () {
myAlert = undefined;
});
};
Any ideas?