Promact / md2

Angular2 based Material Design components, directives and services are Accordion, Autocomplete, Collapse, Colorpicker, Datepicker, Dialog(Modal), Menu, Multiselect, Select, Tabs, Tags(Chips), Toast and Tooltip.
http://code.promactinfo.com/md2/
MIT License
379 stars 112 forks source link

Could not find Angular Material core theme. Most Material components may not work as expected #259

Closed ph55 closed 6 years ago

ph55 commented 7 years ago

Bug:

Warning thrown in console:

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
webpackJsonp.../../../../md2/core/common-behaviors/common-module.js.MdCommonModule._checkTheme @ vendor.bundle.js:57599
MdCommonModule @ vendor.bundle.js:57583
_createClass @ vendor.bundle.js:163965
_createProviderInstance$1 @ vendor.bundle.js:163933
initNgModule @ vendor.bundle.js:163887
NgModuleRef_ @ vendor.bundle.js:164995
createNgModuleRef @ vendor.bundle.js:164979
debugCreateNgModuleRef @ vendor.bundle.js:167263

Which versions of Angular, MD2, OS, browsers are affected?

0.25

EliCDavis commented 7 years ago

I'm pretty sure this doesn't have to do with this repository but the Angular's Material 2. Check out step 4 on that page.

ph55 commented 7 years ago

@EliCDavis Yes you're right - this warning fixed by installing material2 and including one of it's theme css. But this is not the point. If material2 is required - this should be mentioned in docs / setup guide. Otherwise this warning should be fixed imho.

efriandika commented 7 years ago

Hy I got this warning as well..

Why should we do ? import material theming since I dont use it in md2 ? Can anybody explain about it ?

AdhamRammadan commented 6 years ago

Please insert below code into your style.css which is located in your src folder.

@import "../node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css";

You can select any css under the prebuilt-themes folder.