Do <script> tags work in template files? #45
Replies: 3 comments 11 replies
-
Honestly I can't figure how to make them work, I've checked other routers and they don't seem to be doing anything special for scripts neither |
Beta Was this translation helpful? Give feedback.
-
Okay, well the workarounds that worked for me is to have the script somewhere else, or to use inside attributes such as onclick or @click |
Beta Was this translation helpful? Give feedback.
-
@rehhouari is there a special way for importing a js module inside x-init? I am getting the following error:
This is my code => login.js
login.html
|
Beta Was this translation helpful? Give feedback.
-
Hi!
I tried to load a template file using x-template, and the code inside the <script> tag didn't work. Is it supposed to work?
Previously I've had to obfuscate <script> tags when including such code dynamically, like this:
document.write('<script type="text/javascript" src="..."><\/script>'); // from https://stackoverflow.com/a/17542683
Beta Was this translation helpful? Give feedback.
All reactions