我正在使用mean.io堆栈构建一个web应用程序。我正在尝试添加一个‘zingchart’依赖项,我得到了这个错误:
[$injector:nomod] Module 'zingchart-angularjs' 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的新手,所以我很困惑为什么我可以让'ngMaterial‘依赖关系工作得很好,而不是zingchart依赖关系。
有人能给我指出正确的方向/描述我做错了什么吗?
这是我的js文件-- dashboard.js
(function() {
'use strict';
/* jshint -W098 */
function DashboardController($scope, Global, Dashboard, $stateParams) {
$scope.global = Global;
$scope.package = {
name: 'dashboard'
};
}
angular
.module('mean.dashboard', ['ngMaterial', 'zingchart-angularjs'])
.controller('DashboardController', DashboardController);
DashboardController.$inject = ['$scope', 'Global', 'Dashboard', '$stateParams'];
})();index.html
<!DOCTYPE html>
<head>
<script type="text/javascript" src="angular.min.js"></script>
<script type="text/javascript" src="angular-animate.js"></script>
<script type="text/javascript" src="angular-aria.js"></script>
<script type="text/javascript" src="angular-material.js"></script>
<script type="text/javascript" src="zingchart.min.js"></script>
<script type="text/javascript" src="zingchart-angularjs.js"></script>
<script type="text/javascript" src="dashboard.js"></script>
</head>
<body ng-app="mean.dashboard" layout="row" ng-cloak>
<div class="container" layout="row" flex>
<md-sidenav layout="column" class="md-whiteframe-10dp" md-is-locked-open='true'>
<md-list>
<md-list-item>
<md-button>
Dashboard
</md-button>
</md-list-item>
</md-list>
</md-sidenav>
<md-content id="content" flex>
<ng-view>
<zingchart id="myChart" zc-json="myJson" zc-height=500 zc-width=600></zingchart>
</ng-view>
</md-content>
</div>
</body>
</html>https://stackoverflow.com/questions/44476179
复制相似问题