简体   繁体   English

在angular 4中使用bootstrap 4或ng-bootstrap组件

[英]Usage of bootstrap 4 or ng-bootstrap components in angular 4

We are evaluating whether to use bootstrap 4 directly in angular 4 app by importing their styles and java scripts or to use ng-bootstrap angular components for better performance and better interoperability with angular app. 我们正在评估是通过导入导入样式和Java脚本还是直接在angular 4应用程序中使用bootstrap 4,还是使用ng-bootstrap angular组件以实现更好的性能和与angular app更好的互操作性。 Please share your views. 请分享您的看法。

ng-bootstrap contains a set of native Angular directives based on Bootstrap's markup and CSS. ng-bootstrap包含一组基于Bootstrap的标记和CSS的本地Angular指令。 As a result, it's not dependent on jQuery or Bootstrap's JavaScript 结果,它不依赖于jQuery or Bootstrap's JavaScript

NOTE 注意
ng-bootstrap requires Bootstrap's 4 css to be added to your project and you need to Install it explicitly ng-bootstrap要求将Bootstrap的4个CSS添加到您的项目中,并且需要显式安装

Where bootstrap 4 is dependent on jQuery and Bootstrap's JavaScript . 引导程序4取决于jQueryBootstrap's JavaScript I would suggest you to go for ng-bootstrap because it would hugely impact final bundle size 我建议您选择ng-bootstrap因为这会极大地影响最终捆绑包的大小

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM