1

i have a simple index.html with an import of a component, exaclty this. On Chrome works fine, but on others browser (i tried firefox and safari) not, it shows only the index.html content, not the template content of the component. I read this and it seems like my situation, but this solution doesn't work for me.

EDIT: imports are correct (from IDE, if I command+click on links, I can go to the .js)

Community
  • 1
  • 1
Johannes
  • 675
  • 1
  • 7
  • 12

1 Answers1

1

It's because document.currentScript doesn't work with polyfill.

You should use instead :

( document._currentScript || document.currentScript )

Update: Or you can use the new version of HTML Imports polyfill, that makes document.currentScript work as expected.

Supersharp
  • 29,002
  • 9
  • 92
  • 134