1

According to this tutorial we need to set the tsconfig.json compiler option allowJs to true and include CUSTOM_ELEMENTS_SCHEMA and I've done these two things as shown in this Stackblitz:

https://stackblitz.com/edit/angular-web-component-stripping

I also created a minimal reproduction using the latest Angular version here:

https://github.com/fireflysemantics/scully-custom-element-test

In the Stackblitz demo the innerHTML of the hello component is set to:

  <h1> Web Component Test</h1>
  <fs-image url="https://fireflysemantics.github.io/i/developer/instant-html-vscode.png"></fs-image>

However Angular strips the fs-image web component. What do we need to do to include it?

Angular does log this warning:

WARNING: sanitizing HTML stripped some content, see https://g.co/ng/security#xss

Ole
  • 41,793
  • 59
  • 191
  • 359

0 Answers0