Saj*_*ran 2 html javascript angularjs material-design angular-material
我计划用我的应用程序实现角度材料设计.我已经包含了material.js和material.css,应用程序定义如下,这里是代码,
index.html的:
<script src="js/ripples.js"></script>
<script src="js/material.js"></script>
Run Code Online (Sandbox Code Playgroud)
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.
Run Code Online (Sandbox Code Playgroud)
我使用这种顺序注射创建了我的角度材料设计项目,希望它有所帮助,
<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/angular-animate/angular-animate.js"></script>
<script src="bower_components/angular-route/angular-route.js"></script>
<script src="bower_components/angular-aria/angular-aria.js"></script>
<script src="bower_components/hammerjs/hammer.js"></script>
<script src="bower_components/angular-material/angular-material.js"></script>
...
<script src="app.js"></script>
Run Code Online (Sandbox Code Playgroud)
顺便说一句,你是否使用凉亭安装角度材料--save安装它?