我使用[email protected]版本ng-bootstrap(不是ng2-bootstrap)。我做了以下我的角CLI项目:我是否需要在index.html中添加bootstrap.min.css来使用ng-bootstrap?
npm install --save @ng-bootstrap/ng-bootstrap
再依次加入这我的文件:
import {NgbModule} from '@ng-bootstrap/ng-bootstrap';
然后我说这index.html的:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.3/css/bootstrap.min.css">
它是一切工作的伟大。我的问题:
(第1部分)我真的必须在index.html中添加bootstrap.min.css吗?我能否将bootstrap.css添加到index.html并仍然使用ng-boostrap?
(第2部分)如果不是,那么为什么ng-bootstrap不能在他们的设置中包含bootstrap.css,因此我不需要将它添加到index.html?
1)你试过了吗? 2)因为人们可能想使用自定义的bootstrap.css文件。 – JJJ
我曾尝试不将bootstrap.css添加到index.html。 Ng-bootstrap不起作用。我只是好奇,为什么ng-bootstrap在其设置中包含bootstrap.css。我想从你那里得到答案。这是因为有些人可能想要使用自定义的bootstrap.css文件。不错:) :) –