我想添加材料設計到jhipster生成的網關。雖然它似乎在工作,但我在控制檯上看到了這個警告;如何將角材設計添加到jhipster
Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming
Could not find HammerJS. Certain Angular Material components may not work correctly.
以下行添加到的package.json依賴
"@angular/material": "^2.0.0-beta.7",
"hammerjs": "^2.0.8",
以下行添加到global.scss
@import url('https://fonts.googleapis.com/css?family=Roboto:300,400,400i,500,700');
@import '[email protected]/material/prebuilt-themes/indigo-pink.css';
只是注意,如果我註釋掉靛藍pink.css線UI變得醜陋,所以我得出結論,這個CSS是未經評論導入成功。
Jhipster版本是4.5.6
有什麼可以爲警告
編輯的原因1:這解決了hammerjs警告https://stackoverflow.com/a/41322757/795168,但仍主題預警和問題上的UI繼續
刪除bootsrap包並試試這個 –