Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/33.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
Angular 引导程序4中的下拉错误_Angular_Bootstrap 4 - Fatal编程技术网

Angular 引导程序4中的下拉错误

Angular 引导程序4中的下拉错误,angular,bootstrap-4,Angular,Bootstrap 4,我在Bootstrap4文档中创建了下拉列表[ 但当我点击按钮时,它给出了下面的错误 <div class="btn-group"> <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Manage Recipe</button> <div

我在Bootstrap4文档中创建了下拉列表[ 但当我点击按钮时,它给出了下面的错误

<div class="btn-group">
   <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Manage Recipe</button>
   <div class="dropdown-menu">
      <a href="#" class="dropdown-item">To Shopping List</a>
      <a href="#" class="dropdown-item">Edit Recipe</a>
      <a href="#" class="dropdown-item">Delete Recipe</a>
   </div>
</div>

应在引导本身之前导入依赖项,因为后者将尝试使用尚未导入的来自Popper或jQuery的函数。因此,您必须在引导之前放置
Popper.min.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"
],

检查顺序。它应该是jquery,然后是popper,然后是bootstrap
...
"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"
],