Topic: Is angular-bootstrap-md causing hammer.js to be loaded twice?

drullo free asked 5 years ago


When you use ng add angular-bootstrap-md to install the package, it adds a script entry to the angular.json file for hammer.js.  However, for projects that are already using @angular/material, hammer is loaded in the main.js file.  Is this redundant?  I have removed the entry in angular.json and confirmed that my angular-bootstrap-md components still work.


Damian Gemza staff answered 5 years ago


Dear @drullo 

You shouldn't combine the @angular/material with angular-bootstrap-md because sooner or later, you'll get some problems.

But if you want to use @angular/material and our angular-bootstrap-md, please remove the hammer.js from the angular.json file, and as you say before, the project will work fine.

Best Regards,

Damian


drullo free commented 5 years ago

Not being able to combine Angular Material with angular-bootstrap-md is a very serious limitation!  Most Angular projects make some use of Angular Material.

Can you elaborate on your comment: "sooner or later, you'll get some problems"?  What problems specifically?  Can you describe the circumstances that would result in incompatibilities?


Damian Gemza staff commented 5 years ago

Dear drullo,

The first and the last problem which you'll definitely encounter while combining both MDB Angular and Angular Material is with inputs. In both products, inputs are styled with some bottom border, and borders from 2 frameworks are placed on one input. That's not an elegant situation for UI, so you have to know about it.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 7.0.0
  • Device: PC
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: Yes
  • Provided link: No