错误:$ injector:modulerr模块错误AngularJS 1.4.8

时间:2016-04-01 10:35:14

标签: javascript angularjs django

我在加载Angular App时遇到错误。我在我的django应用程序中有这个。

这是我的代码:

HTML:

 {% extends "food_app/common/base.html" %}
 {% load staticfiles %}


{% block js %}
    <script type="text/javascript" src="{% static "js/home.js" %}"></script>
{% endblock %}


{% block content %}
<div ng-app="home_app">

<div ng-controller="home_controller">


    <md-content>
        <input ng-model="message2">
        {$ message $}
        {$ message2 $}
    </md-content>

   </div>

</div>
{% endblock %}

JS:

angular.module('home_app', ['services','ngMaterial', 'ngMessages', 'material.svgAssetsCache'])

我已经加载了位于{% load staticfiles %}的项目所需的所有内容。我只是简单地从我的基地扩展了它。

所以现在我只是在home.js中为此页面加载了我的JS。但我似乎无法连接到我的应用程序。

我收到此错误:

Uncaught Error: [$injector:modulerr]      http://errors.angularjs.org/1.4.8/$injector/modulerr?p0=home_app&p1=Error%3…p%3A%2F%2F127.0.0.1%3A8000%2Fstatic%2Flib%2Fjs%2Fangular.min.js%3A19%3A463)

错误堆栈

Error: $injector:modulerr
Module Error
Failed to instantiate module home_app due to:
Error: [$injector:modulerr]    http://errors.angularjs.org/1.4.8/$injector/modulerr?p0=s...)
at Error (native)
at http://127.0.0.1:8001/static/lib/js/angular.min.js:6:416
at http://127.0.0.1:8001/static/lib/js/angular.min.js:38:391
at n (http://127.0.0.1:8001/static/lib/js/angular.min.js:7:333)
at g (http://127.0.0.1:8001/static/lib/js/angular.min.js:37:488)
at http://127.0.0.1:8001/static/lib/js/angular.min.js:38:134
at n (http://127.0.0.1:8001/static/lib/js/angular.min.js:7:333)
at g (http://127.0.0.1:8001/static/lib/js/angular.min.js:37:488)
at eb (http://127.0.0.1:8001/static/lib/js/angular.min.js:41:249)
at c (http://127.0.0.1:8001/static/lib/js/angular.min.js:19:463

0 个答案:

没有答案