Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/79.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
如何安装引导程序4+;jquery+;带角度6的popper.js_Jquery_Angular_Bootstrap 4_Popper.js_Angular6 - Fatal编程技术网

如何安装引导程序4+;jquery+;带角度6的popper.js

如何安装引导程序4+;jquery+;带角度6的popper.js,jquery,angular,bootstrap-4,popper.js,angular6,Jquery,Angular,Bootstrap 4,Popper.js,Angular6,我已将Angular和Node安装并更新至最新版本 Angular CLI: 6.0.0 Node: 8.11.1 OS: win32 x64 Angular: 6.0.0 ... animations, cli, common, compiler, compiler-cli, core, forms ... http, language-service, platform-browser ... platform-browser-dyna

我已将Angular和Node安装并更新至最新版本

    Angular CLI: 6.0.0
    Node: 8.11.1
    OS: win32 x64
    Angular: 6.0.0
    ... animations, cli, common, compiler, compiler-cli, core, forms
    ... http, language-service, platform-browser
    ... platform-browser-dynamic, router

     Package                                                                   
     -----------------------------------------------------------
    @angular-devkit/architect         0.6.0
    @angular-devkit/build-angular     0.6.0
    @angular-devkit/build-optimizer   0.6.0
    @angular-devkit/core              0.6.0
    @angular-devkit/schematics        0.6.0
    @ngtools/webpack                  6.0.0
    @schematics/angular               0.6.0
    @schematics/update                0.6.0
    rxjs                              6.1.0
    typescript                        2.7.2
    webpack                           4.6.0
通过npm安装了Bootstrap 4,虽然它可以工作,但是下拉列表和modals不起作用,因为jquery和popper.js没有像以前在angular 5中那样导入

这就是我所做的: 安装了以下 1-npm安装bootstrap@next--保存 2-npm安装jquery--保存 3-npm安装popper.js--保存

并将其添加到angular.json中,因为没有angular.cli.json

     "styles": [   
        "../node_modules/bootstrap/dist/css/bootstrap.min.css",
         "styles.css"
      ],
     "scripts": [  
         "../node_modules/jquery/dist/jquery.min.js",
         "../node_modules/bootstrap/dist/js/bootstrap.min.js",
         "../node_modules/popper.js/dist/umd/popper.min.js"
      ],
别忘了跑步:

npm i tether --save
接下来在angular.json中,将tether路径放在jquery和bootstrap之间

"scripts": [
"../node_modules/jquery/dist/jquery.min.js",
"../node_modules/tether/dist/js/tether.min.js",
"../node_modules/bootstrap/dist/js/bootstrap.min.js"]

这就是我用Angular 9安装它的方式

npm install --save bootstrap jquery popper.js

如果您只需要jquery进行引导,请安装ng bootrapinstead@Davidng引导程序安装引导程序的最后一集?您需要自己安装引导程序css,并且ng引导程序为使用angular编写的引导程序组件(下拉、模式等)提供本机实现,而无需jQuery。