相关疑难解决方法(0)

如何在角度2中使用bootstrap 4?

我正在构建一个用打字稿写的角度2应用程序.它会将bootstrap 4框架与一些自定义主题结合使用,这可能吗?

"ng2-bootstrap"npm包无法正常工作,因为它不允许我使用bootstrap css类,而是提供自定义组件.(http://github.com/valor-software/ng2-bootstrap)

在我的角度2项目中,我正在使用sass,是否可以从源代码构建bootstrap 4,因为它也使用sass进行样式化?

sass npm twitter-bootstrap typescript angular

47
推荐指数
4
解决办法
6万
查看次数

向Angular 6添加jQuery组件

我在将jQuery级联下拉组件嵌入到Angular 6项目时遇到问题。尝试运行时出现错误ng serve

错误:ENOENT:没有此类文件或目录,请打开C:\ nodeprojects \ node_modules \ jquery \ dist \ jquery.min.js。


这是我将jQuery添加到Angular 6的步骤:

npm install jquery

”,并且经过验证jquery.min.js是在上面列出的路径中。

  1. 已修改angular.json(Angular 6不再具有“ angular-cli.json”文件),并jquery.min.js在“ scripts []”部分中为文件添加了相对路径。

  2. 我正在app.component用作目标组件。在中app.component.ts,我进入,declare var $: any;并在里面输入了jQuery自定义组件函数export class AppComponent implements OnInit()

我尝试嵌入Angular的jquery组件位于https://jsfiddle.net/brohjoe/zgc0n1q5/1/

HTML已输入app.component.html。我删除了对脚本src的引用,因为已列出了缩小的jquery库,angular.json并且如上所述已嵌入了custom.js代码app.component.ts

运行localhost:4200后,将显示的唯一ui元素是没有数据的下拉列表。

jquery angular-cli angular

2
推荐指数
1
解决办法
2万
查看次数

Bootstrap 3.4 版在 Angular 9 中不起作用

我已经使用 Angular cli 安装了 bootstrap 3.4 版。下面是我使用的命令 npm install --save bootstrap@3 然后我添加了

"styles": [
          "./node_modules/bootstrap/dist/css/bootstrap.min.css",
          "src/styles.css"
        ],
        "scripts": [
          "./node_modules/bootstrap/dist/js/bootstrap.min.js"
        ]
Run Code Online (Sandbox Code Playgroud)

在 angular.json 文件中。但我无法访问引导程序默认样式类。每当我运行应用程序时,浏览器控制台中都不会显示引导文件。

我在这里找不到问题。您的帮助将不胜感激。添加我的 node_modules 文件夹的屏幕截图 节点模块

twitter-bootstrap-3 angular

0
推荐指数
1
解决办法
2411
查看次数