I have a normal binding like this {{foo}}
and it displays foo\'s value as text in the HTML. The text that comes from the server is \"R&D\"
For a little more fun and flexibility, you can create a pipe that parses HTML entities:
@Pipe({name: "decodeHtmlString"})
export class DecodeHtmlString implements PipeTransform {
transform(value: string) {
const tempElement = document.createElement("div")
tempElement.innerHTML = value
return tempElement.innerText
}
}
{{foo | decodeHtmlString}}