Angularjs ngAnimate没有注射

时间:2014-12-02 14:17:29

标签: angularjs ng-animate

为什么ngAnimate没有“注入”应用程序?

这是我的代码:

<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js"></script>
<script src="//code.angularjs.org/1.2.2/angular-animate.min.js"></script)
<script type="text/javascript">

var myApp = angular.module("application", ["ngAnimate"]);

    myApp.controller('MainCtrl', 
        ['$http', '$location', function($http, $location) {
    ...
}

似乎很简单的代码,但我收到了这个错误:

Error: [$injector:modulerr] http://errors.angularjs.org/1.2.26/$injector/modulerr?p0=application&p1=%5B%24injector%3Anomod%5D%20http%3A%2F%2Ferrors.angularjs.org%2F1.2.26%2F%24injector%2Fnomod%3Fp0%3Dapplication%0AC%2F%3C%40http%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.2.26%2Fangular.min.js%3A6%3A450%0AZc%2Fb.module%2Fb%5Be%5D%3C%40http%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.2.26%2Fangular.min.js%3A20%3A1%0AZc%2Fb.module%40http%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.2.26%2Fangular.min.js%3A20%3A1%0Agc%2Fe%2F%3C%40http%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.2.26%2Fangular.min.js%3A33%3A267%0Ar%40http%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.2.26%2Fangular.min.js%3A7%3A288%0Ae%40http%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.2.26%2Fangular.min.js%3A33%3A207%0Agc%40http%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.2.26%2Fangular.min.js%3A36%3A309%0Afc%2Fc%40http%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.2.26%2Fangular.min.js%3A18%3A170%0Afc%40http%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.2.26%2Fangular.min.js%3A18%3A387%0AXc%40http%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.2.26%2Fangular.min.js%3A17%3A415%0A%40http%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.2.26%2Fangular.min.js%3A215%3A30%0Ax.Callbacks%2Fc%40http%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fjquery%2F1.10.2%2Fjquery.min.js%3A4%3A26031%0Ax.Callbacks%2Fp.fireWith%40http%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fjquery%2F1.10.2%2Fjquery.min.js%3A4%3A26840%0A.ready%40http%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fjquery%2F1.10.2%2Fjquery.min.js%3A4%3A3303%0Aq%40http%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fjquery%2F1.10.2%2Fjquery.min.js%3A4%3A715%0A


...gify(arguments[c]):arguments[c]);return Error(a)}}function Pa(b){if(null==b||Ga(...

无休止地搜索Google和SO以获得答案,但没有一个即将到来......

1 个答案:

答案 0 :(得分:1)

<script src="//code.angularjs.org/1.2.2/angular-animate.min.js"></script)

必须是

<script src="//code.angularjs.org/1.2.2/angular-animate.min.js"></script>

括号)错误。