bold function doesn't work in Typescript
Hello, so I'm working on Angular project and I have a function in a typescript file that bold a specific part
formatText() {
...........
new_text = part1 + word.bold() + part2;
return new_text;
}
then I called I returned in an HTML file
<div *ngFor="let sentence of sentences">
<li>
{{formatText()}}
</li>
</div>
However what I get is the tags instead of bolding the word like this:
A young college teacher <b>leaves</b> China for the United States in search of a better future.