Welcome to the Treehouse Community
Looking to learn something new?
Error loading js on Angular
Hi. I'm having some difficulties when implementing angular on my app.
I'm using a MEAN app, with pugs files. I've included the js files on the layoyt.pug after the body tag.
The angular module is been read with ng-app on the body tag.
However, I get the following errors on Chrome console:
dashboard:184 GET http://localhost:3000/scripts/hello-world.js dashboard:184 GET http://localhost:3000/scripts/app.js dashboard:184 GET http://localhost:3000/scripts/app.js dashboard:184 GET http://localhost:3000/scripts/hello-world.js 404 (Not Found)
I've already tried to change the path of the files on the layout.pug file, but doesn't work at all.
Any one can help me?
Seth Kroger56,407 Points
It would help if you showed your code, but the next thing you should check is if you set up the
static middleware is set up correctly so it can serve the JS files.