【发布时间】:2016-05-17 17:46:38
【问题描述】:
出现以下错误
angular.min.js:40 未捕获错误:[$injector:modulerr] http://errors.angularjs.org/1.5.5/$injector/modulerr?p0=ngAnimate&p1=Error%…lime%2520Text%25203%2FPackages%2Fmysamplefolder%2Fangular.min.js% 3A21%3A19)
我的代码是
$(document).ready(function(){
$('.insert').click(function(){
$('.addItems').show( "slow" );
});
$('.close').click(function(){
$('.addItems').hide('slide',{direction:'down'},'slow');
});
});
function dataTable($scope) {
$scope.items = [
{
id:'11111',
name:'JohnDoe Number1',
city:'Angel',
state:'AA',
phone:'111-111-1111'
},
{
id:'22222',
name:'JaneDoe Number1',
city:'Bigfoot',
state:'AB',
phone:'222-222-2222'
},
{
id:'33333',
name:'JohnDoe Number2',
city:'Comfy',
state:'AC',
phone:'333-333-3333'
},
{
id:'44444',
name:'JaneDoe Number2',
city:'Dreamy',
state:'AD',
phone:'444-444-4444'
}];
$scope.addItem = function(item) {
$scope.items.push(item);
$scope.item = {};
}
$scope.removeItem = function(index){
$scope.items.splice(index,1);
}
};
【问题讨论】:
-
可能是你没有在你的应用中注入 ngAnimate 依赖。
-
您的代码 sn-p 不清楚。你为你的应用定义了模块吗?
-
请分享您的代码,直到我们能够为您提供帮助。
标签: angularjs