使用Angular 13安装Bootstrap 5
我尝试使用此链接在Angular 13中安装Bootstrap: https://wwwww.itsolutionstuff。 com/post/how-to-in-intall-bootstrap-5 in-n-gular-13example.html
但是,由于我将bootstrap更新为v5,因此不起作用,所有样式都是错误的。 另一方面,它可以与Bootstrap 4.6.1合适。
我做的与此链接相同。还有另一件事可以做吗?
I have try to install Bootstrap in Angular 13 with this link:
https://www.itsolutionstuff.com/post/how-to-install-bootstrap-5-in-angular-13example.html
However, as i update bootstrap to v5 it does not work, all the styles are wrong.
On the other hand, it works properly with bootstrap 4.6.1.
I have do the same as this link. Is there another thing that is supose to be done?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我的建议是转到 https://getbootstrap.com/ 并按照其网站上的安装说明进行操作。它在其上具有最新版本的Bootstrap 5,并为您提供链接和脚本直接输入到您的HTML页面中。
my recommendation would be to go to https://getbootstrap.com/ and follow the installation instructions on their website. it has the newest version of bootstrap 5 on it and it gives you links and scripts to input straight into your html page.
通常,很难仅尝试通过
npm install
导入样式,您会发现在大多数情况下使用CDN要容易得多。因此,我建议您在依赖项中列出的任何bootstrap软件包的 npm Angular项目的代码>在默认的
< s
粘贴cdn下:现在您的项目应该具有Bootstrap 5。
Normally it's hard to try to import styles only by
npm install
, you'll find that it's much easier to use a CDN instead in most cases.So what I would suggest you is make
npm uninstall
of any bootstrap package you have listed in your dependencies atpackage.json
, then go toindex.html
of your angular project and under the default<link>s
paste the cdn:Now your project should have bootstrap 5.
变为Boostrap 5。
我的问题是,某些班级名称从Boostrap 4 -align-items-right“> bootstrap 5 navbar对齐项目
另一方面,我安装了此库,而是Boostrap,因为它具有全部依赖关系,并且我发现它更容易
My issue was that some class names has change from boostrap 4 to boostrap 5. I leave here a link if someone has the same problem:
Bootstrap 5 navbar align items right
On the other hand, i installed this library instead boostrap as it has all dependencies and i find it easier
https://ng-bootstrap.github.io/#/home
它非常简单,您可以将我的2步分为角度。
使用bootstrap cdn- https://get https:/开始/下载/
使用NPM命令:-NPM install bootstrap-save或npm i bootstrap -save。
如果您是Angular的新初学者,请访问我的博客,该博客在该页面上制作了一个详细的内容。
请访问: - https:// ngangulardeteTails。 blogspot.com/p/how-to-install-bootstrap-5-or-latest.html 。
Its Very Simple you can down my 2 Step into Angular.
Use Bootstrap Cdn - https://getbootstrap.com/docs/5.2/getting-started/download/
Use NPM Command:- npm install bootstrap --save or npm i bootstrap --save.
If you are a new beginner into Angular Please visit my blog on that i have made a Detail content on that page.
Please Visit :- https://ngangulardetails.blogspot.com/p/how-to-install-bootstrap-5-or-latest.html.