ax1 / iridiumjs

🚀 Boost HTML horsepower
MIT License
1 stars 0 forks source link

relative jsfiles in templates #1

Open ax1 opened 8 years ago

ax1 commented 8 years ago

if project structure is:

index.html
details/details.html
details/js/details.js

and details.html has:

<script src="js/details.js">
<div></div>

if index.html try to load details.html, the map.js is attempted to be loaded from /js/details and not from /details/js/details.js

Solution a) check jquery load to load relative urls Solution b) add project relative urls ( /details/js/details.js) Solution c) add project absolute urls (//... or dynamically created absolute uris {{root}}) Solution d) implement require ('') or import, instead of Githubissues.

  • Githubissues is a development platform for aggregating issues.