Reputation: 41
Hi everyone a have a application using jhipster 7.6.0 and i want to install angular material.
This is the error I get when I run ng add @angular/material
I can not install material design problem on the screen capture below
I think I have the same error with the angular material installation
Upvotes: 1
Views: 385
Reputation: 8614
You can use Material Design for Bootstrap 5 & Angular 13. Here's how:
Install The MDB Angular UI KIT: npm i mdb-angular-ui-kit
Add the following to import MDB stylesheet in src/main/webapp/content/scss/vendor.scss
:
@import url('https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap');
@import "~mdb-angular-ui-kit/assets/scss/mdb.scss";
https://fonts.googleapis.com
and https://fonts.gstatic.com
to the style-src
and font-src
content security policy rules in src/main/resources/config/application.yml
.jhipster:
...
security:
content-security-policy: "... style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; ... font-src 'self' data: https://fonts.gstatic.com"
global.scss
:/* Error highlight on input fields */
.ng-valid[required],
.ng-valid.required {
border-left: 5px solid green;
}
.ng-invalid:not(form) {
border-left: 5px solid red;
}
.dropdown-menu
rule to set the display to none
..dropdown-menu {
padding-left: 0;
display: none;
}
Below is a screenshot taken after these changes.
Upvotes: 2