首页 > 其他 > 详细

angular 如何使用第三方组件ng-bootstrap

时间:2017-09-13 11:46:18      阅读:605      评论:0      收藏:0      [点我收藏+]

1.在你的项目中以下指令    npm install --save @ng-bootstrap/ng-bootstrap

安装完成会显示

 

+ @ng-bootstrap/ng-bootstrap@1.0.0-beta.4

added 1 package in 8.757s

 

 

2.在AppModule模块中引入这个组件:

import {NgbModule} from ‘@ng-bootstrap/ng-bootstrap‘;

@NgModule({
  declarations: [AppComponent, ...],
  imports: [NgbModule.forRoot(), ...],
  bootstrap: [AppComponent]
})
export class AppModule {
}

3.在(想要使ng-bootatrap组的)组件中引入这个模块:

import {NgbModule} from ‘@ng-bootstrap/ng-bootstrap‘;

@NgModule({
  declarations: [OtherComponent, ...],
  imports: [NgbModule, ...]
})
export class OtherModule {
}

4。完成第三方组件的使用。

 

angular 如何使用第三方组件ng-bootstrap

原文:http://www.cnblogs.com/kaid/p/7514005.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!