gpt4 book ai didi

javascript - 具有angularJS应用程序的 Angular Material

转载 作者:太空宇宙 更新时间:2023-11-04 14:01:48 28 4
gpt4 key购买 nike

我计划在我的应用程序中实现 Angular Material 设计。我已经包含了 material.js 和 material.css,应用程序定义如下,这是代码,

Index.html:

 <script src="js/ripples.js"></script>
<script src="js/material.js"></script>

应用.jsar 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.

最佳答案

我已经使用这种顺序注入(inject)创建了我的 Angular Material 设计项目,希望对您有所帮助,

  <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>

顺便说一句,您是否使用 bower install angular-material --save 安装它?

关于javascript - 具有angularJS应用程序的 Angular Material ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28424805/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com