My app is built using the MEAN stack. When a user visits the URL:
http://localhost:3000/edit/0
Where 0 represents a record id. Initially, it seems like everything should work fine, but I am facing an issue where my scripts are not loading in the edit.js file:
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css"></script>
<link rel="stylesheet" type="text/css" href="/css/style.css">
<script src="bower_components/jquery/jquery.min.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="bower_components/ng-file-upload/angular-file-upload-shim.min.js"></script>
I keep getting errors similar to this for each script and CSS file:
GET http://localhost:5000/edit/bower_components/jquery/jquery.min.js 404 (Not Found)
It appears that the files are being searched for within an edit directory instead of at the root level. How can I resolve this issue? Since it's a GET request, I need to include the id in the params.