What error are you getting in the console? Is it the HTML 404’ing, or the .js?
Also, not directly related to your issue, but best practices would be to have a separate file for each view rather than shared html/js used by all views as otherwise you’re loading data for views that may not even need it.