Twitter bootstrap 3 在角度6中使用引导3

Twitter bootstrap 3 在角度6中使用引导3,twitter-bootstrap-3,angular6,Twitter Bootstrap 3,Angular6,如何在angular 6中使用bootstrab 3??这根本不起作用,我用过: npm install bootstrap@3 jquery --save 然后更新angular.json,如下所示: "styles": [ "src/styles.css", "../../node_modules/bootstrap/dist/css/bootstrap.min.css" ], "scripts": [

如何在angular 6中使用bootstrab 3??这根本不起作用,我用过:

npm install bootstrap@3 jquery --save
然后更新angular.json,如下所示:

"styles": [
          "src/styles.css",
          "../../node_modules/bootstrap/dist/css/bootstrap.min.css"

        ],
        "scripts": [
          "../../node_modules/jquery/dist/jquery.min.js",
          "../../node_modules/bootstrap/dist/js/bootstrap.min.js"
        ]
在html引导类中出现,但它不工作!!这是一个错误

91% additional asset processing scripts-webpack-plugin× 「wdm」: Error: ENOENT: no such file or directory, open 'E:\node_modules\jquery\dist\jquery.min.js'

为了达到预期的结果,请按如下所示更新您的节点_模块位置

"styles": [
              "src/styles.css",
              "../node_modules/bootstrap/dist/css/bootstrap.min.css"
            ],
            "scripts": [
              "../node_modules/jquery/dist/jquery.min.js",
              "../node_modules/bootstrap/dist/js/bootstrap.min.js"
            ]
代码示例-

我解决了它

“样式”:[
“src/styles.css”,
“node_modules/bootstrap/dist/css/bootstrap.min.css”
],
“脚本”:[
“node_modules/jquery/dist/jquery.min.js”,
“node_modules/bootstrap/dist/js/bootstrap.min.js”
]
安装引导程序(所有引导程序都安装在节点\模块文件夹中)

Angular.json文件

将样式和脚本文件添加到globalise的Angular.json

"styles": [
    "src/styles.css",
    "node_modules/bootstrap/dist/css/bootstrap.min.css"
],
"scripts": [
    "node_modules/bootstrap/dist/js/bootstrap.min.js",
    "node_modules/jquery/dist/jquery.min.js"
]
component.html

<a class="btn btn-lg btn-primary" href="" role="button">View</a>


节点模块的路径可能错误,我认为应该是“./node_modules”以供参考。请参阅其仍然存在的git此错误:91%额外的资产处理脚本webpack plugin×「wdm」:错误:enoint:没有此类文件或目录,打开“E:\node\u modules\jquery\dist\jquery.min.js”除上述错误外的任何其他控制台错误,也可以从consoleany luck@amParammary共享之前的错误
<a class="btn btn-lg btn-primary" href="" role="button">View</a>