Reputation: 1
I'm having great difficulty trying to link my js file to one of my hbs files. For some context, within my hbs file I have:
<script src="../homepage.js" type="text/javascript"></script>
Now, the homepage.js file is found one folder above where the hbs file is located, so thats why I'm using ../ in th src. When I try to run my app, however, I am met with "homepage.js 404 error" in the browser console.
If anyone knows what could be going wrong, it would be greatly appreciated.
Thanks!
Upvotes: 0
Views: 493
Reputation: 1281
homepage.js
may not be in your webroot. If this code is in a page in your root directory, then your are asking the browser to retrieve something that you have not made publicly available.
Upvotes: 1