npm install bootstrap --save

npm install --save @ng-bootstrap/ng-bootstrap

在style.scss中引入css

@import "~bootstrap/dist/css/bootstrap.css";

 

在app.module注入

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

imports: [
...
NgbModule,
 ...
],

 

在页面中使用

<button type="button" class="btn btn-primary">
  Single Button
</button>

 

效果:

angular6 中使用bootstrap

 

相关文章:

  • 2021-04-10
  • 2022-12-23
  • 2021-09-29
  • 2021-12-09
  • 2022-02-03
  • 2022-12-23
  • 2021-11-26
  • 2021-11-17
猜你喜欢
  • 2021-11-02
  • 2021-08-30
  • 2021-06-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-02
相关资源
相似解决方案