最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Using Bootstrap and ng-bootstrap is good? - Stack Overflow

programmeradmin5浏览0评论

I have two modules in my angular website , one is "bootstrap" and another one is "ng-bootstarp".

Does both modules are required , or any one is needed?

I am planning to keep only "ng-bootstarp" 4.0.0.0 and to remove "bootstrap"

Is this fine?

Also let me know the steps to remove "Bootstrap" ?

Can i just go ahead and delete the bootstrap from the ng_module folder or do i need to use any mands?

I have two modules in my angular website , one is "bootstrap" and another one is "ng-bootstarp".

Does both modules are required , or any one is needed?

I am planning to keep only "ng-bootstarp" 4.0.0.0 and to remove "bootstrap"

Is this fine?

Also let me know the steps to remove "Bootstrap" ?

Can i just go ahead and delete the bootstrap from the ng_module folder or do i need to use any mands?

Share Improve this question asked Dec 19, 2018 at 10:34 SmartestVEGASmartestVEGA 8,90928 gold badges95 silver badges150 bronze badges 1
  • 3 the first step would be to remove it and to see what breaks. – Eriks Klotins Commented Dec 19, 2018 at 10:36
Add a ment  | 

2 Answers 2

Reset to default 8

Don't delete it unless it's causing issues, Bootstrap is intended to be installed alongside ng-bootstrap.

Bootstrap is supposed to be installed when using ng-bootstrap, because ng-bootstrap relies on Bootstrap's CSS, but it replaces everything else that es with Bootstrap, as you can see in their dependencies. The CSS is then set in your angular.json or imported into the main styles.css

That said, the non-CSS parts of Bootstrap are unused and could be deleted, but if you're using a package manger, e.g. NPM, this could cause issues when updating and you'll need to repeat this process each update.

As pointed out by @Eliseo, an alternative to using the normal Boostrap with everything included is to use bootstrap-only-css, which can be installed using NPM or Bower, details here. This isn't an official Boostrap distribution as far as I can tell, so keep that in mind.

TLDR: there's no good reason to delete Boostrap.

Angular Material is the official UI framework for Angular, and is maintained (aside from open-source contributors) by Google engineers.

The munity is fantastic, the documentation is excellent, and all of the ponents and utilities are designed to be used with Angular specifically. The source is a case-study in how to write code the Angular way.

It is for the reasons outlined above that I picked AM to be our pany’s preferred UI framework.

I haven’t used Bootstrap in a very long time and I would not consider using it in a new project now.

发布评论

评论列表(0)

  1. 暂无评论