错误:[$ injector:modulerr] http://errors.angularjs.org/1.4.0/ $注射器/ modulerr P0 = FOO&安培; P1 =%5B%24injector%3Anomod%5D%20Module%20'富'!%图20是%20not%20available%20You%20either%20misspelled%第二十条%20module%20name%20or%20forgot%20to%20load%20IT。%20If%20registering%20A%20module%20ensure%20that%20you%20specify%第二十条%20dependencies%20AS%第二十条%20秒%20argument。%0Ahttp%3A%2F %2Ferrors.angularjs.org%2F1.4.0%2F%24injector%2Fnomod%3Fp0%3Dfoo%0Ahttp%3A%2F%2Flocalhost%3A8080%2Ffoo%2Fassets%2Fjs%2Fangular%2Fangular.js%3A1957%3A71%0Aensure%40http %3A%2F%2Flocalhost%3A8080%2Ffoo%2Fassets%2Fjs%2Fangular%2Fangular.js%3A1879%3A45%0Amodule%40http%3A%2F%2Flocalhost%3A8080%2Ffoo%2Fassets%2Fjs%2Fangular%2Fangular.js%3A1953 %3A20%0Ahttp%3A%2F%2Flocalhost%3A8080%2Ffoo%2Fassets%2Fjs%2Fangular%2Fangular.js%3A4340%3A35%0AforEach%40http%3A%2F%2Flocalhost%3A8080%2Ffoo%2Fassets%2Fjs%2Fangular%2Fangular的.js%3A338%3A24%0AloadModules%40http%3A%2F%2Flocalhost%3A8080%2Ffoo%2Fassets%2Fjs%2Fangular%2Fangular.js%3A4324%3A12%0AcreateInjector%40http%3A%2F%2Flocalhost%3A8080 %2Ffoo%2Fassets%2Fjs%2Fangular%2Fangular.js%3A4250%3A22%0AdoBootstrap%40http%3A%2F%2Flocalhost%3A8080%2Ffoo%2Fassets%2Fjs%2Fangular%2Fangular.js%3A1627%3A34%0Abootstrap%40http%3A %2F%2Flocalhost%3A8080%2Ffoo%2Fassets%2Fjs%2Fangular%2Fangular.js%3A1648%3A23%0AangularInit%40http%3A%2F%2Flocalhost%3A8080%2Ffoo%2Fassets%2Fjs%2Fangular%2Fangular.js%3A1542%3A14 %0Ahttp%3A%2F%2Flocalhost%3A8080%2Ffoo%2Fassets%2Fjs%2Fangular%2Fangular.js%3A28130%3A16%0Atrigger%40http%3A%2F%2Flocalhost%3A8080%2Ffoo%2Fassets%2Fjs%2Fangular%2Fangular.js %3A2975%3A9%0AeventHandler%40http%3A%2F%2Flocalhost%3A8080%2Ffoo%2Fassets%2Fjs%2Fangular%2Fangular.js%3A3249%3A25
我在index.html中包含了以下参考资料
<script type="text/javascript" src="assets/js/angular/angular.js"></script>
<script type="text/javascript" src="assets/js/angular/angular-route.js"></script>
<script type="text/javascript" src="assets/js/angular/angular-resource.js"></script>
<script type="text/javascript" src="assets/js/angular/angular-cookies.js"></script>
<script type="text/javascript" src="assets/js/angular-filter/angular-filter.min.js"></script>
<script type="text/javascript" src="assets/js/select/select.min.js"></script>
<script type="text/javascript" src="assets/js/ui-utils/ui-utils.min.js"></script>
<script type="text/javascript" src="assets/js/ui-bootstrap/ui-bootstrap-tpls.min.js"></script>
和我的js文件看起来像:
'use strict';
var fooApp = angular.module('foo', ['ui.utils', 'ui.bootstrap', 'ngRoute', 'ngResource', 'ngCookies', 'angular.filter', 'ui.select']);
答案 0 :(得分:0)
您需要在index.html中包含angular-cookies
,然后注入ngCookies
依赖项。
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.0rc1/angular-cookies.js">
答案 1 :(得分:0)
在模块中,您必须确保已包含模块的所有依赖项&#39; app&#39;
它表明某些依赖项未加载。
您必须在应用中包含ngCookies
请参考
或在angularjs
之后的索引文件中包含<script src="ajax.googleapis.com/ajax/libs/angularjs/X.Y.Z/angular-cookies.js">