简体   繁体   English

下拉模块在ngx-bootstrap中不可用

[英]Dropdown Module is not available in ngx-bootstrap

I am upgrading my project from angular2 to angular4. 我正在将项目从angular2升级到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. 升级时显示ng2-bootstrap已更改为ngx-bootstrap ,我已将其添加到package.jso n中并更新了模块。

but now when I use 但是现在当我使用

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

DropdownModule is showing error, its missing DropdownModule显示错误,丢失

previously it was like 以前就像

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

then it was working fine(angular2) 然后工作正常(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. 如何将引导程序添加到angular-cli项目我昨晚将NGX-Bootstrap与angular cli集成在一起,遇到了一些麻烦,这是使用alert模块的一个非常相似的问题。 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 您要导入的模块实际上称为“ BSDropdownModule”。ngx-bootstrap的下拉菜单的文档位于: http ://valor-software.com/ngx-bootstrap/#/dropdowns

Here is a code sample of how to use BSDropdownModule: 这是有关如何使用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(){}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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