首页 > 解决方案 > 为什么即使在安装和导入依赖项之后,bootstrap 4 下拉和切换按钮也不起作用?

问题描述

这是我尝试过的!

https://navbarex.stackblitz.io

我已经安装了 bootstrap、jquery 和 popper.js

我已经在 angular.json 文件中导入了它

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

我在我的本地机器上尝试过同样的事情,它工作正常,但为什么不在 StackBlitz 中呢?

标签: jquerytwitter-bootstrapbootstrap-4angular7

解决方案


推荐阅读