找不到ngMaterial依赖项

时间:2016-07-25 22:02:27

标签: javascript angularjs angular-material angular-module

由于某种原因,我的应用程序中找不到ng-Material,它给了我错误!我会在下面显示代码和错误:

的index.html:

<!DOCTYPE html>
<html>

<head>
    <meta id="meta" name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
    <link href='https://fonts.googleapis.com/css?family=RobotoDraft:400,500,700,400italic' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" href="assets/dist/css/vendor.min.css" type="text/css" />
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/angular_material/1.1.0-rc2/angular-material.min.css">
    <script type="text/javascript" src="assets/dist/js/vendor.min.js"></script>



    <!-- Angular Material requires Angular.js Libraries -->
  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular.min.js"></script>
  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular-animate.min.js"></script>
  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular-aria.min.js"></script>
  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.3/angular-messages.min.js"></script>

  <!-- Angular Material Library -->
  <script src="https://ajax.googleapis.com/ajax/libs/angular_material/1.1.0-rc2/angular-material.min.js"></script>



    <link rel="stylesheet" href="global.css" type="text/css" />


    <link href="https://code.ionicframework.com/nightly/css/ionic.css" rel="stylesheet">
    <script src="https://code.ionicframework.com/nightly/js/ionic.bundle.js"></script>



    <script type="text/javascript" src="app/app.module.js"></script>
    <script type="text/javascript" src="app/app.route.js"></script>
    <script type="text/javascript" src="assets/dist/js/app.min.js"></script>


</head>


    <body ng-app="Hive">


      <div ui-view class="main_view">
      </div>


   <ion-tabs class="tabs-icon-top tabs-energized">

        <ion-tab title="Home" icon="ion-home" ui-sref="home">
          <ion-nav-view name="home-tab"></ion-nav-view>
        </ion-tab>

        <ion-tab title="Discussions" icon="ion-android-contacts" ui-sref="discussions">
          <ion-nav-view name="discussions-tab"></ion-nav-view>
        </ion-tab>

        <ion-tab title="Board" icon="ion-ios-list-outline" ui-sref="board">
          <ion-nav-view name="list-tab"></ion-nav-view>
        </ion-tab>


             <ion-tab title="Me" icon="ion-android-happy" ui-sref="me">
          <ion-nav-view name="profile-tab"></ion-nav-view>
        </ion-tab>

      </ion-tabs>


  </body>


</html>

app.module.js:

(function (angular) {
    'use strict';
    angular.module('Hive', [
            'ionic',
            'firebase',
            'ngMaterial'
        ]
    );

})(angular);

错误:

vendor.min.js:3 Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.2.7/$injector/modulerr?p0=Hive&p1=Error%3A%20…sers.io%2Famanuel2%2Fhive%2Fassets%2Fdist%2Fjs%2Fvendor.min.js%3A3%3A14873)

如您所见,如果单击链接模块ng-Material无法启动。我不知道发生了什么,我也有确切的参考,Angular Material入门页面有:https://material.angularjs.org/latest/getting-started。非常感谢帮助!! :)

修改

vendor.min.js是什么,它是我所需要的所有产品库。它在paths.js中获取所有这些库:

   'assets/lib/js/ionic/ionic.min.js',
    'assets/lib/js/angular/angular.min.js',
    'assets/lib/js/angular-ui/angular-ui-router.min.js',
    'assets/lib/js/ionic/ionic-angular.min.js',
    'assets/lib/js/firebase/firebase.js',
    'assets/lib/js/firebase/angularfire.min.js',

将它们全部放在一个文件中,然后缩小它们。我不知道那里的问题是什么:(。我目前在Web IDE上工作这里:https://ide.c9.io/amanuel2/hive

0 个答案:

没有答案