Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.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
Angular http://localhost:4200/node_modules/bootstrap/dist/css/bootstrap.min.css 404角度误差2_Angular - Fatal编程技术网

Angular http://localhost:4200/node_modules/bootstrap/dist/css/bootstrap.min.css 404角度误差2

Angular http://localhost:4200/node_modules/bootstrap/dist/css/bootstrap.min.css 404角度误差2,angular,Angular,我在index.html文件中添加了引导依赖项。此索引文件位于src文件夹中。节点模块位于其上方。文件夹结构如下所示 Library node_modules src index.html 现在我的目标是index.html中的node_模块。我的代码如下 <link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.min.css"> <script src="

我在index.html文件中添加了引导依赖项。此索引文件位于src文件夹中。节点模块位于其上方。文件夹结构如下所示

Library
  node_modules
  src
    index.html
现在我的目标是index.html中的node_模块。我的代码如下

   <link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.min.css">
   <script src="../node_modules/jquery/dist/jquery.min.js"></script>

还尝试了./And,只是从node_模块开始。这里有什么问题。

  • 请检查该文件是否在节点_模块下可用
    • style.CSS
      文件中导入CSS,该文件将自动编译
希望您使用的是
angularcli
软件包


用于引导的文件首先在那里吗?它在node_模块中。如果您有
angular cli.json
文件,请将用于引导的资源放在
styles
下,它与jquery有关的问题也可以尝试一下吗?
@import '~bootstrap/dist/css/bootstrap.min.css';