javascript - Angular 4 Bootstrap dropdown require Popper.js -
i have fresh created angular 4 cli app. after running this:
npm install bootstrap@4.0.0-beta jquery popper.js --save
and editing .angular-cli.json this:
"styles": [ "styles.css", "../node_modules/bootstrap/dist/css/bootstrap.min.css" ], "scripts": [ "../node_modules/jquery/dist/jquery.slim.min.js", "../node_modules/bootstrap/dist/js/bootstrap.min.js", "../node_modules/popper.js/dist/umd/popper.min.js" ],
i still have issue in chrome console:
uncaught error: bootstrap dropdown require popper.js (https://popper.js.org) @ eval (eval @ webpackjsonp.../../../../script-loader/addscript.js.module.exports (addscript.js:9), <anonymous>:6:17548) @ eval (eval @ webpackjsonp.../../../../script-loader/addscript.js.module.exports (addscript.js:9), <anonymous>:6:23163) @ eval (eval @ webpackjsonp.../../../../script-loader/addscript.js.module.exports (addscript.js:9), <anonymous>:6:50902) @ eval (<anonymous>) @ webpackjsonp.../../../../script-loader/addscript.js.module.exports (addscript.js:9) @ object.../../../../script-loader/index.js!../../../../bootstrap/dist/js/bootstrap.min.js (bootstrap.min.js?f885:1) @ __webpack_require__ (bootstrap a2f1d85ef068872b0530:54) @ object.2 (scripts.bundle.js:66) @ __webpack_require__ (bootstrap a2f1d85ef068872b0530:54) @ webpackjsonpcallback (bootstrap a2f1d85ef068872b0530:25)
how fix this?
include popper.js
before bootstrap.js
:
"scripts": [ "../node_modules/jquery/dist/jquery.slim.min.js", "../node_modules/popper.js/dist/umd/popper.min.js" "../node_modules/bootstrap/dist/js/bootstrap.min.js", ],
Comments
Post a Comment