0

How can I use the content of a file in JavaScript as does VueJS with .vue files? As far as I am aware Vue doesn't use any Ajax to achieve this. So if I have a .whatever file how can I import / parse this external content?

asked Jun 24, 2020 at 17:25
4
  • just add that external file reference in .html and use access the functions, objects from your .js file Commented Jun 24, 2020 at 17:28
  • stackoverflow.com/questions/48211891/… Commented Jun 24, 2020 at 17:30
  • Could you code a tiny example? Commented Jun 24, 2020 at 17:33
  • Does this work without a server running? Commented Jun 24, 2020 at 19:18

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.