简体   繁体   中英

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.jso n 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?

应该是BsDropdownModule

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

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(){}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM