Angularjs with material design Failed to instantiate module ngMaterial

自闭症网瘾萝莉.ら 提交于 2019-12-22 04:58:16

问题


I have installed angularjs and materialjs using bower.

bower install angular-material

And injected 'ngMaterial' into my app but getting this error.

Uncaught Error: [$injector:modulerr] Failed to instantiate module demoApp due to:
Error: [$injector:modulerr] Failed to instantiate module ngMaterial due to:
Error: [$injector:modulerr] Failed to instantiate module material.core due to:
Error: [$injector:unpr] Unknown provider: $mdUtilProvider

Any Help.


回答1:


I had the same problem until I changed my angular version from 1.2.28 to 1.3.0 in my bower.json file.

See if your angular version is less than 1.3.0, or if you have a dependency which forces angular to a version less than that number.

Hope it helps.

Ps.: I'm using angular-material version 0.7.1



来源:https://stackoverflow.com/questions/28587937/angularjs-with-material-design-failed-to-instantiate-module-ngmaterial

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!