未捕获的错误:[$喷油器:CDEP]循环依赖发现:$ templateRequest< - $有生< - cfpLoadingBar< - $ HTTP< - $ templateRequest< - $编译 [英] Uncaught Error: [$injector:cdep] Circular dependency found: $templateRequest <- $animate <- cfpLoadingBar <- $http <- $templateRequest <- $compile

查看:683
本文介绍了未捕获的错误:[$喷油器:CDEP]循环依赖发现:$ templateRequest< - $有生< - cfpLoadingBar< - $ HTTP< - $ templateRequest< - $编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有问题,我的角度JS应用程序,我已经使用的NuGet从AngularJS 1.3.0 Beta版升级到1.3.16,这我有以下错误:


  

angular.js:4183未捕获的错误:[$喷油器:CDEP]循环依赖
  发现:$ templateRequest< - $有生< - cfpLoadingBar< - $ HTTP< -
  $ templateRequest< - $编译
  的http://errors.angularjs.org/1.3.16/$injector/cdep?p0=%24templateRequest%20%…oadingBar%20%3C-%20%24http%20%3C-%20%24templateRequest%20%3C-%20%24compile


我尝试添加$注射器家居控制器这样的,但它并没有解决问题。可能有人帮助我吗?

 (函数(){
    使用严格的;    VAR应用= angular.module(应用);    VAR的HomeController =功能($范围,$位置$喷油器,authService,userInfoService,主页){
       };    app.controller(HomeController中',['$范围,$位置,$喷油器','authService','userInfoService,主页,HomeController的]);}());


解决方案

我从v0.3.0到v0.8.0解决在升级cfpLoadingBar问题

I have Problem with my angular JS application I have used nuget to upgrade from AngularJS 1.3.0 Beta to 1.3.16 and it I have the following error:

angular.js:4183 Uncaught Error: [$injector:cdep] Circular dependency found: $templateRequest <- $animate <- cfpLoadingBar <- $http <- $templateRequest <- $compile http://errors.angularjs.org/1.3.16/$injector/cdep?p0=%24templateRequest%20%…oadingBar%20%3C-%20%24http%20%3C-%20%24templateRequest%20%3C-%20%24compile

I tried adding $injector to home controller like this but it didn't resolve the issue. Could someone help me?

(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]);

}());

解决方案

I have solve the problem by upgrade cfpLoadingBar from v0.3.0 to v0.8.0

这篇关于未捕获的错误:[$喷油器:CDEP]循环依赖发现:$ templateRequest&LT; - $有生&LT; - cfpLoadingBar&LT; - $ HTTP&LT; - $ templateRequest&LT; - $编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆