【问题标题】:Uncaught error injector modulerr in angular.min.js 40angular.min.js 40 中未捕获的错误注入器 modulerr
【发布时间】: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


【解决方案1】:

通过<script> 标签在您的.html 文件中包含ngAnimate 模块。

【讨论】:

    猜你喜欢
    • 2017-01-24
    • 2019-04-20
    • 2017-01-14
    • 1970-01-01
    • 2015-11-01
    • 1970-01-01
    • 1970-01-01
    • 2019-02-07
    • 1970-01-01
    相关资源
    最近更新 更多