未找到角度翻译模块“pascalprecht.translate”

Lui*_*spo 5 javascript internationalization angularjs angular-translate

我正在尝试将角度翻译添加到我的角度应用程序中。我遵循了这个简单的快速入门:https://angular-translate.github.io/docs/#/guide,但我的应用程序不会引导,给我以下错误:

未捕获的错误:[$injector:modulerr] 无法实例化模块 myApp,原因是:错误:[$injector:modulerr] 无法实例化模块 pascalprecht.translate,原因是:错误:[$injector:nomod] 模块“pascalprecht.translate”是无法使用!您要么拼错了模块名称,要么忘记加载它。如果注册模块,请确保将依赖项指定为第二个参数。

我的index.html文件正确包含角度翻译,如下所示:

<script src="bower_components/angular-translate/angular-translate.js"></script>
Run Code Online (Sandbox Code Playgroud)

任何线索为什么会发生这种情况?我真的很感激你的帮助。

更新

这是我的app.js的一部分,用于澄清一些事情:

var app = angular.module('myApp', [
  'ngAnimate',
  'ngCookies',
  'ngResource',
  'ngSanitize',
  'ngTouch',

  // 3rd party modules.
  'ui.router',
  'restangular',
  'angular.filter',
  'ui.bootstrap',
  'pascalprecht.translate',


  // Custom modules.
  'myApp.config'
])
.
.
.
Run Code Online (Sandbox Code Playgroud)

Lui*_*spo 1

它失败是因为另一个依赖项抛出错误,特别是jquery.easy-pie-chart。我根本没有使用该依赖项,因此我删除了它,角度翻译开始正常工作,没有出现问题。