In our Angular app we are using an pi that returns strings containing HTML encoded characters, for example it would return 'let's'
where '
is the encoded "single quote character"
I would like to create a function htmlDecode(myString) to return the decoded string in the javascript code, for example:
var myString = 'let's';
var decodedString = htmlDecode(myString);
console.log(decodedString); // CONSOLE OUTPUT: "let's"
I looked at the $sce
service but could not come up with a solution yet.