In my angular 4 application, ngbDropdown-Element from ng-bootstrap does not work.
In this case, I installed the following npm modules:
"@ng-bootstrap/ng-bootstrap": "^1.0.0-alpha.22",
"bootstrap": "4.0.0-alpha.6",
"bootstrap-sass": "^3.3.7",
My app.module.ts looks like this:
import { BrowserModule } from "@angular/platform-browser"
import { NgModule } from "@angular/core";
import { FormsModule } from "@angular/forms";
import { HttpModule } from "@angular/http";
import { AppComponent } from "./app.component";
import { FileitHeaderComponent } from "./fileit-header/fileit-header.component";
import {TranslateModule} from "ng2-translate";
import { CCACampaignComponent } from "./cca-campaign/cca-campaign.component";
import {NgbModule} from "@ng-bootstrap/ng-bootstrap";
@NgModule({
declarations: [
AppComponent,
FileitHeaderComponent,
CCACampaignComponent
],
imports: [
BrowserModule,
FormsModule,
HttpModule,
TranslateModule.forRoot(),
NgbModule.forRoot()
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
And in the CCA campaign, I'm trying to use the ng-bootstrap demo:
<div ngbDropdown class="d-inline-block">
<button class="btn btn-outline-primary" id="dropdownMenu1" ngbDropdownToggle>Toggle dropdown</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenu1">
<button class="dropdown-item">Action - 1</button>
<button class="dropdown-item">Another Action</button>
<button class="dropdown-item">Something else is here</button>
</div>
</div>
But the result of this code, unfortunately, is very bad:

and nothing happens when I click on it ...