我想運行一個角度材質的例子,但對於我的生活我無法弄清楚爲什麼我得到這個錯誤。
我得到的錯誤是Error: $injector:modulerr Module Error
這是錯誤報告我:link
任何想法的問題可能是什麼?我實際上從他們的示例網站複製粘貼這個。
下面是代碼:
angular.module('MyApp',['ngMaterial', 'ngMessages', 'material.svgAssetsCache'])
.controller('AppCtrl', function($scope) {
});
.buttondemoBasicUsage section {
background: #f7f7f7;
border-radius: 3px;
text-align: center;
margin: 1em;
position: relative !important;
padding-bottom: 10px; }
.buttondemoBasicUsage md-content {
margin-right: 7px; }
.buttondemoBasicUsage section .md-button {
margin-top: 16px;
margin-bottom: 16px; }
.buttondemoBasicUsage .label {
position: absolute;
bottom: 5px;
left: 7px;
font-size: 14px;
opacity: 0.54; }
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-animate.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-aria.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-route.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-messages.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-material.min.js"></script>
<div ng-controller="AppCtrl" ng-cloak="" class="buttondemoBasicUsage" ng-app="MyApp">
<md-content>
<section layout="row" layout-sm="column" layout-align="center center" layout-wrap="">
<md-button class="md-icon-button md-primary" aria-label="Settings">
<md-icon md-font-icon="icon-home"></md-icon>
</md-button>
<md-button class="md-icon-button md-accent" aria-label="Favorite">
<md-icon md-font-icon="icon-home"></md-icon>
</md-button>
<md-button class="md-icon-button" aria-label="More">
<md-icon md-font-icon="icon-home"></md-icon>
</md-button>
<md-button href="http://google.com" title="Launch Google.com in new window" target="_blank" ng-disabled="true" aria-label="Google.com" class="md-icon-button launch">
<md-icon md-font-icon="icon-home"></md-icon>
</md-button>
<div class="label">Icon Button</div>
</section>
</md-content>
</div>
<!--
Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that can be in foundin the LICENSE file at http://material.angularjs.org/license.
-->
是這三個模塊,'[ 'ngMaterial', 'ngMessages',「material.svgAssetsCache ']'在你正在加載的8個文件中的一箇中定義的某個地方? – War10ck