I have some autogenerated html code highlighting some texts in my angularJS app. The line generating the html code is this one:
var replaced = original.replace(regEx, '<span style="background-color: red;">' + replacing + '</span>');
line[key + 'HL'] = replaced;
But writing this on template
<div><p>{{line.codeHL ? line.codeHL : line.code}} {{line.price}}</p></div>
shows this:
<span style="background-color: red;">GD5AU211</span> 102€
How can I force the evaluation of html code inside a string?
Also let's just say I can't use document.getElementById()
for reasons.