Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Bootstrap for Angular and Material design for Angular together

I'm working on a project with this template.

The template is written using AngularJs and Bootstrap-UI (bootstrap for angular) and I would like to include some Material Design elements like cards and others.

Is it possible to do that? is it recommended? My thing is we already love this template and way to many elements of it, but Material Design have cards, dropdown, text inputs with the label animation etc for example which are amazing.

So my question is:

AngularJS + Bootstrap for Angular + Material Design for Angular = Awesomeness or Disaster?

like image 872
Felipe Millan Avatar asked Mar 28 '15 05:03

Felipe Millan


People also ask

Can we use both material and Bootstrap together?

Yes, you can.

Can we install Bootstrap and Angular material together?

Angular Material is mostly based on flex layout. You should check whether that is restriction for you. If you only use input components and do not integrate any other bootstrap javascript (such as ng-bootstrap) framework, it should work.

Should I use Bootstrap or material with Angular?

Angular Material Framework can be used to design High-quality websites and web apps that are mobile-friendly. Bootstrap Framework can be used for developing cross-platform apps that work well on desktops. Angular Material Framework does not support the Responsive Oriented Approach (ROA).


Video Answer


2 Answers

If you add both bootstrap & angular-material this is what will happen

  1. Both have css which will target your front end elements (e.g. input
    element, buttons)

  2. Each have their own look & feel (i.e. Bootstrap input element is different from Material input element). So, your overall project won't have one single look & feel.

  3. If you add both you will have to take care of css styles overriding others on common parts (e.g. font size & font family).

  4. Angular-material handles front end elements in angular way ( directive) So when they release a new version (29 releases so far), you will have to spent some time testing your earlier code (e.g.they changed $media to $mdMedia for handling sideMenu). I've spent a lot of time finding why my sideMenu stopped working!.

  5. You overall size of project dependencies will increased if you are using two front end frameworks.

    Angular-material needs its own dependencies like 'angular-animate' & 'angular-aria'.

Talking about your "md-cards" there are "panels" in bootstrap you might wanna have a look here

I would recommend you stick to one thing either bootstrap or angular-material. Both are awesome just dont mix them.

like image 123
nitin Avatar answered Sep 22 '22 16:09

nitin


I just recently wrote a blog post on how to replace Bootstrap with Angular-Material. Its based on the kickstarter framework of choice I'm using, but it'll do the job you are after.

Much like @nitin said, it will be challenging to implement both. What I'd actually ask you to think about, regardless of whether its possible, is why you would want both?

The purpose of both is to provide an overall common UI style, but they are conceptually apposed to each other, rather than something that could work in tandem.

I'd recommend you start reading more about material design from the google guides before jumping right in.

like image 36
thunk Avatar answered Sep 22 '22 16:09

thunk