Угловой 6 добавить JQuery, поппер и бутстрап JS - PullRequest
0 голосов
/ 27 сентября 2018

Я работаю с angular 6 и sass bootstrap project и пытаюсь добавить jquery, popper и js в angular.json

Мой код в angular.json:

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

Я пробовал это также:

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

, но переключение и выпадающее меню не работают для меня.

1 Ответ

0 голосов
/ 27 сентября 2018
 npm install bootstrap to install boostrp
 npm install jquery to install jquery and add path under the 'build' inside 
 angular.json

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

Please verify the file inside the node_modules.
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...