トップに戻る
tags
.ts
this.myHtml= '<script>alert("XSS TEST");</script>テストHTML<br>テストHTML<br>テストHTML<br>テストHTML';
.html
<p [innerHTML]="myHtml"></p>
これだけで、自動的にXSS対策もされています。
edit