Angularjs with material design Failed to instantia

2019-04-25 07:46发布

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条回答
在下西门庆
2楼-- · 2019-04-25 08:36

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

查看更多
登录 后发表回答