Search code examples
angularangular2-mdl

Integrate MDL with Angular 2


The MDL didn't works with Angular in my Environnement. I proceed this tutorial :

https://getmdl.io/started/index.html

The libraries are present in node_modules, but debugger show me message :

[WDS] App updated. Reloading...
login:10 GET http://localhost:4200/node_modules/material-design-lite/material.min.css 
login:11 GET http://localhost:4200/node_modules/material-design-lite/material.min.js 
login:12 GET http://localhost:4200/node_modules/material-design-icons/iconfont/material-icons.css 
Navigated to http://localhost:4200/login
lang.js:130 Angular is running in the development mode. Call enableProdMode() to enable the production mode.

Solution

  • it isn't enough to import some scripts from mdl. There needs to be done a little bit more work or you can use a wrapper lib that handles most of the work for you: https://github.com/mseemann/angular2-mdl