angular-酒窝依赖注入

angular-dimple dependency injection

我想在我的应用程序中使用“angular-dimple”库,但依赖项注入不起作用。在 homepage of the library 中,他们说我只需要在 html 中包含 d3 和 dimple 链接,并且只需要在我的模块声明中包含 'angular-dimple' 作为依赖项。问题是这不起作用,因为我收到此错误:

"...模块 'angular-dimple' 不可用!您拼错了模块名称或忘记加载它。如果注册模块,请确保将依赖项指定为第二个参数。"

我的angular模块声明和html头文件如下:

var smsApp = angular.module('smsApp', ['angular-dimple', 'ui.bootstrap']);
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        
        <title>Solidarity Message Service</title>
        
        <!-- Latest compiled and minified CSS -->
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
        
        <!-- Custom CSS -->
        <link rel="stylesheet" type="text/css" href="css/sms-blaster.css">
              
        <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
        <script src="https://code.jquery.com/jquery.js"></script>
        
        <!-- Latest compiled and minified JavaScript -->
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
    
        <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
      
        <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
        <![endif]-->
        
        
        <script src="angular-1.5.8/angular.js"></script>
        <script src="angular-1.5.8/angular-animate.js"></script>
        
        <script src="angular-plugins/ui-bootstrap-tpls-2.2.0.js"></script>
        
        <!-- Dimple graphics dependencies-->
        <script src="http://d3js.org/d3.v3.min.js"></script>
        <script src="http://dimplejs.org/dist/dimple.v2.1.6.min.js"></script>
        
        <script src="javascripts/sms-blaster.js"></script>
 
    </head>

我在这里错过了什么?

P.S.: 我已经尝试在 html 中的 angular 之前放置 d3 和 dimple 脚本链接,并且我已经交换了我引用的优先级 angular-dimple 和 ui-bootstrap 在 angular.module.

的依赖数组中

您的 HTML 中似乎缺少该库。添加 angular-dimple.js(在 Angular 导入之后)

<script src="../assets/js/lib/angular-dimple.js"></script>