我正在嘗試將ngAnimate
添加到我的角度應用程序依賴項中。這是我的角度app文件:
var carApp = angular.module("carApp", ["ngAnimate"]);
這裏是我的TableBodyCtrl
控制器:
carApp.controller("TableBodyCtrl", function($scope, $http){
$scope.loading = false;
...
});
這裏是我的TablePanelCtrl
:
carApp.controller("TablePanelCtrl", function(){
this.tab = 1;
...
});
我的控制器都在controller
文件夾不同的文件。
這裏是角庫的腳本加載:
<script type="text/javascript" src="js/angular.min.js"></script>
<script type="text/javascript" src="js/angular-animate.min.js"></script>
這裏是我的角度應用程序文件的腳本負荷:
<script type="text/javascript" src="js/carApp.js"></script>
這裏是我的控制器的腳本加載:
<script type="text/javascript" src="js/controllers/TablePanelCtrl.js"></script>
<script type="text/javascript" src="js/controllers/TableBodyCtrl.js"></script>
當我運行我的網絡應用程序時,出現此錯誤:
Unknown provider: $$qProvider <- $$q <- $animate <- $compile
https://docs.angularjs.org/error/$injector/unpr?p0=$$qProvider%20%3C-%20$$q%20%3C-%20$animate%20%3C-%20$compile
此錯誤僅在我將角色應用依賴關係添加"ngAnimate"
後纔會顯示。
我該如何解決這個問題?
你使用哪種角度的角度?嘗試添加它的調試版本以獲取更多的錯誤信息 – 2014-10-02 10:21:07
AngularJS v1.2.18 – 2014-10-02 10:22:38
Angular-Animate-AngularJS v1.3.0-build.3317 + sha.a1648a7 – 2014-10-02 10:28:43