title: angular 8 ng-bootstrap 5.2.2 reactive forms, NgbDatepicker not working
body: <p>Why is the Bootstrap datepicker not working with reactive forms ?</p>
  <pre><code>&lt;input formControlName=&quot;startDate&quot; class=&quot;form-control&quot; [ngClass]=&quot;{ 'is-invalid': submitted &amp;&amp; f.startDate.errors }&quot; ngbDatepicker #d /&gt;
  
  export class AddEventComponent implements OnInit {
  
  @ViewChild('d', { read: NgbDatepicker, static: true }) d: NgbDatepicker;
  </code></pre>
  <p>If I put:</p>
  <pre><code>&lt;input formControlName=&quot;startDate&quot; class=&quot;form-control&quot; [ngClass]=&quot;{ 'is-invalid': submitted &amp;&amp; f.startDate.errors }&quot; ngbDatepicker #d=&quot;ngbDatepicker&quot; /&gt;
  </code></pre>
  <p>I get the error: <code>There is no directive with &quot;exportAs&quot; set to &quot;ngbDatepicker&quot;</code>.</p>