Can Bootstrap (4) be integrated along with Angular Material (2)?

前端 未结 4 1075
醉话见心
醉话见心 2020-12-15 17:55

I\'d like to use Angular Material 2 library, because of its (growing list of) components. But i\'m used to bootstrap and it\'s goodies like responsive utilities and lightwei

4条回答
  •  Happy的楠姐
    2020-12-15 18:44

    Angular Material 2 is a new library still in active development so you should not expect many fancy nice to have features in that, yet, but on the long run you will have a lots of benefits using Material 2 in you angular app. Here is some overview:

    Component Development Kit

    In the last releases Material 2 team introduced @angular/cdk which is a core for Material 2 and also gives developers a great ground to write their own thirdparty components. There is no much docs on @angular/cdk yet, but you can track that issue https://github.com/angular/material2/issues/2789 to keep updated on that matter.

    Responsive goddies

    There is no builtin functionality in Material 2 that gives you responsive goddies. For that matter you have to use @angular/flex-layout thing is completely separate from Material 2 - basically it is a nice abstraction on top of Flexbox CSS. Using that you do not have to write whole bunch of responsive css mediaQueries yourself.

    Browsers support

    Material 2: IE11+
    Bootstrap 4 IE10+
    Bootstrap 3 IE8+

    Bootstrap + Material ?

    There is no reason you want to combine both Frameworks in your app if you think about the total size of your bundles having referencing two heavy front end frameworks. Also in that case you have to care about conflicts that may occur using both in the same project.

提交回复
热议问题