Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/73.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
HTML-在父目录中包含Javascript_Html_Angularjs - Fatal编程技术网

HTML-在父目录中包含Javascript

HTML-在父目录中包含Javascript,html,angularjs,Html,Angularjs,我有一个HTML页面,我试图包括一些js文件,如 <script type="text/javascript" src="../bower_components/jquery/jquery.js"></script> 但我一直在 资源解释为脚本,但使用MIME类型text/html传输:http://localhost:8080/bower_components/jquery/jquery.js“ 接 Uncaught语法错误:意外标记

我有一个HTML页面,我试图包括一些js文件,如

<script type="text/javascript" src="../bower_components/jquery/jquery.js"></script>

但我一直在

资源解释为脚本,但使用MIME类型text/html传输:http://localhost:8080/bower_components/jquery/jquery.js“

Uncaught语法错误:意外标记

在开发人员控制台中。我正在尝试angular.js和node.js上的一些教程

已解决

您将
。/bower\u components/jquery/jquery.js作为脚本,因此浏览器尝试将其解释为脚本。它查找
的原因当您将浏览器指向
http://localhost:8080/bower_components/jquery/jquery.js
?看起来它正在返回HTML,可能是一个错误页面?已解决:我能够使用修复它。