【发布时间】:2026-01-01 04:35:01
【问题描述】:
我计划在我的应用程序中实现角度材料设计。我已经包含了 material.js 和 material.css,应用程序定义如下, 这是代码,
Index.html:
<script src="js/ripples.js"></script>
<script src="js/material.js"></script>
app.js ar routerApp = angular.module('DiginRt', ['ui.bootstrap','SimpleCouch','ngMaterial']);
当我开始运行应用程序时,它会说
Uncaught Error: [$injector:modulerr] Failed to instantiate module DiginRt due to:
Error: [$injector:modulerr] Failed to instantiate module ngMaterial due to:
Error: [$injector:nomod] Module 'ngMaterial' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
【问题讨论】:
-
angular.js引用放在哪里,material.js之前还是之后? -
您最好创建一个 jsfiddler/plnkr.co/codpen 演示应用,以便更好地进行故障排除。
标签: javascript html angularjs material-design angular-material