Angular http://localhost:4200/node_modules/bootstrap/dist/css/bootstrap.min.css 404角度误差2
我在index.html文件中添加了引导依赖项。此索引文件位于src文件夹中。节点模块位于其上方。文件夹结构如下所示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="
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_模块开始。这里有什么问题。- 请检查该文件是否在节点_模块下可用
- 在
文件中导入CSS,该文件将自动编译style.CSS
- 在
angularcli
软件包
用于引导的文件首先在那里吗?它在node_模块中。如果您有
angular cli.json
文件,请将用于引导的资源放在styles
下,它与jquery有关的问题也可以尝试一下吗?
@import '~bootstrap/dist/css/bootstrap.min.css';