hilda_sonica_vish
hilda_sonica_vish

Reputation: 757

Dropdown Module is not available in ngx-bootstrap

I am upgrading my project from angular2 to angular4.

While upgrading it's showing that ng2-bootstrap is changed to ngx-bootstrap, I have added it in my package.json and updated my modules.

but now when I use

 import { DropdownModule,ModalModule, PaginationModule, DatepickerModule, TabsModule } from 'ngx-bootstrap';

DropdownModule is showing error, its missing

previously it was like

   import { DropdownModule,ModalModule, PaginationModule, DatepickerModule, TabsModule } from 'ngx-bootstrap';

then it was working fine(angular2)

what should i do?

Upvotes: 2

Views: 4389

Answers (2)

KyleJayMaxwell
KyleJayMaxwell

Reputation: 111

How to add bootstrap to an angular-cli project I was integrating NGX-Bootstrap with angular cli last night and was having some trouble, here is a question very similar using the alert module. The module you are importing is actually called "BSDropdownModule" The documentation of ngx-bootstrap's dropdowns is here: http://valor-software.com/ngx-bootstrap/#/dropdowns

Here is a code sample of how to use BSDropdownModule:

// RECOMMENDED (doesn't work with system.js)
import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
// or
import { BsDropdownModule } from 'ngx-bootstrap';

@NgModule({
  imports: [BsDropdownModule.forRoot(),...]
})
export class AppModule(){}

Upvotes: 0

Khashayar
Khashayar

Reputation: 1351

It should be BsDropdownModule:

import { BsDropdownModule, ModalModule, PaginationModule, DatepickerModule, TabsModule } from 'ngx-bootstrap';

Upvotes: 5

Related Questions