角度拼接动画

时间:2015-07-20 21:50:15

标签: angularjs

我尝试包括课程#34;动画"关于拼接的索引,但我不理解跟随错误..

拼接通常起作用,但是......

function deleteS(item, index) {

    var deferred = allDB.remove({section: $rootScope.$stateParams.section, id: item.id});

    deferred.$promise.then(function () {

        var itemIndex = $rootScope.items.indexOf(item);
        $rootScope.selected     = [];

        console.log(itemIndex);

         $("tr:eq(" +itemIndex+ ")").addClass('animated fadeOutDown', 
             setTimeout(
                 function(){
                     $rootScope.items.splice(itemIndex, 1)
                     $mdToast.show($mdToast.simple({position: 'top right'}).content(item.id + ' ....Deletados!'))
                 }, 500)
         );

    });

    return deferred.$promise;
}

0 个答案:

没有答案