Уважаемые все, наконец-то решили эту ошибку Bootstrap 4 Навбар не разваливается в Angular 9
пошагово
1) импорт NgbModule
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
<nav class="navbar navbar-expand-lg navbar-dark bg-dark ">
<div class="container">
<a class="navbar-brand" (click)="home()">THE ONLINE PROJECT</a>
<button class="navbar-toggler" type="button" (click)="isCollapsed = !isCollapsed" [attr.aria-expanded]="!isCollapsed" aria-controls="collapseExample">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="collapseExample" [ngbCollapse]="isCollapsed">
<ul class="navbar-nav ml-auto">
<li class="nav-item active">
<a class="nav-link" (click)="home()">Home</a>
</li>
<li class="nav-item active">
<a class="nav-link" (click)="about()">About</a>
</li>
<li class="nav-item active">
<a class="nav-link" (click)="services()">Services</a>
</li>
<li class="nav-item active">
<a class="nav-link" (click)="contact()">Contact</a>
</li>
</ul>
</div>
</div>
</nav>