Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/30.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 Datepicker没有出现ng引导_Angular_Ng Bootstrap - Fatal编程技术网

Angular Datepicker没有出现ng引导

Angular Datepicker没有出现ng引导,angular,ng-bootstrap,Angular,Ng Bootstrap,日期选择器没有出现。我尝试在弹出窗口中使用日期选择器,但当按下按钮时,不会显示弹出窗口 header.component.html <form class="form-inline"> <div class="form-group"> <div class="input-group"> <input class="form-control" placeholder="yyyy-mm-dd" name="dp" [(ngModel)

日期选择器没有出现。我尝试在弹出窗口中使用日期选择器,但当按下按钮时,不会显示弹出窗口

header.component.html

<form class="form-inline">
  <div class="form-group">
    <div class="input-group">
      <input class="form-control" placeholder="yyyy-mm-dd" name="dp" [(ngModel)]="model" ngbDatepicker #d="ngbDatepicker">
      <div class="input-group-append">
        <button class="btn btn-outline-secondary calendar" (click)="d.toggle()" type="button"></button>
      </div>
    </div>
  </div>
</form>
index.html

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>App</title>
  <base href="/">

  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
  <app-root></app-root>
</body>
</html>

应用程序

这是因为您没有在
angular.json

angular.json

"styles": [
"./node_modules/bootstrap/dist/css/bootstrap.min.css",
],

我有
“bootstrap”:“^4.3.1”,
作为依赖项,我正在使用
@import'~bootstrap/dist/css/bootstrap.min.css'导入我的样式文件我已经用一张显示问题的图片更新了问题,也许这会给你更多信息创建stackblitz复制检查是否实际加载了引导css,控制台中是否有任何错误?控制台中没有错误
"styles": [
"./node_modules/bootstrap/dist/css/bootstrap.min.css",
],