我的角度JS应用程序有问题我使用nuget从AngularJS 1.3.0 Beta升级到1.3.16并且我有以下错误:
angular.js:4183未捕获错误:[$ injector:cdep]循环依赖 发现:$ templateRequest< - $ animate< - cfpLoadingBar< - $ http< - $ templateRequest< - $ compile http://errors.angularjs.org/1.3.16/ $注射器/ CDEP?P0 =%24templateRequest%20%... oadingBar%20%3 C-%20%24http%20%3 C-%20%24templateRequest%20%3 C-%20%24compile
我尝试将$ injector添加到家庭控制器,但它没有解决问题。有人能帮助我吗?
(function () {
'use strict';
var app = angular.module('app');
var HomeController = function ($scope, $location, $injector, authService, userInfoService, homeService) {
};
app.controller('HomeController', ['$scope', '$location','$injector','authService', 'userInfoService', 'homeService', HomeController]);
}());
答案 0 :(得分:7)
我已经通过将cfpLoadingBar从v0.3.0升级到v0.8.0解决了这个问题