I have HTML page inside a folder in style library called: Employee.html, so the link is: /style library/MyProject/Employee.html, I have also JS file inside the same folder called Employee.JS, I added a content editor web part to the page and referenced this HTML page. I am referencing the JavaScript file from the Employee.html like this:
<script type="text/javascript" language="javascript" src="Employee.js"></script>
As they exist in the same folder. But when rendered in content editor web part, it's referenced based on the page inside the site pages library. So it's expecting the file to be in: sitepages/Employee.js.
What's the best practice to reference files in a relative way between custom html page and js files?