无法将Bootstrap加载到新的Angular 13项目中的一个组件。
- angular.json文件已经添加了以下行:
"styles": [
"src/styles.css",
"./node_modules/bootstrap/dist/css/bootstrap.min.css"
],
1.我验证了我有引导安装在上述位置。
1.我使用下面的node命令安装了bootstrap:npm install bootstrap@3
1条答案
按热度按时间643ylb081#
你的设置看起来不错。我通常也会安装
@ng-bootstrap/bootstrap
,以使用引导模式。documentation提到了这个兼容性表,但这些实际上只是指南。
我一直在使用以下版本的Angular 14.0.6,没有任何问题。所以,我很确定你也可以在Angular 13上使用它们。
正如你提到的,我有angular.json