实施 Bootstrap CSS 以在 Angular 4 CLI 项目中正确使用 ng-bootstrap

Implement Bootstrap CSS to use properly ng-bootstrap into Angular 4 CLI project

嗨,Whosebug 社区!

只是一个简单的问题,我在我的 Angular 4 项目中使用以下 link 实现 Ng-Bootstrap Getting started ng-bootstrap and I've got a doubt about lines number 2 they says: " The only required dependencies are: Bootstrap CSS ", but what does it mean exactly? Because when you click on the hyperlink on the same sentence it brings you there Download bootstrap link 有很多文件(bootstrap.grid.css、boostrap.reboot.css 等)。因此,根据这些文件,我的问题是:我是否应该将所有这些文件及其 links 放入我的项目资产并放入我的 angular-cli.json "styles" 和 "scripts" 或只是 bootstrap.min.css 就足够了吗?

注意 我实际上只需要 "datepicker" 元素。 (可能会在项目的后面更多..)

提前感谢您的意见和回答

这意味着您需要包含 bootstrap 样式。更新您的 .angular-cli.json 文件以包含您应用的 bootstrap 样式:

"styles": [
     "../node_modules/bootstrap/dist/css/bootstrap.min.css",
    "styles.css",
  ],