Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angularjs 角度UI引导-旋转木马指令-动画CSS提供程序未知_Angularjs_Angular Ui Bootstrap_Carousel - Fatal编程技术网

Angularjs 角度UI引导-旋转木马指令-动画CSS提供程序未知

Angularjs 角度UI引导-旋转木马指令-动画CSS提供程序未知,angularjs,angular-ui-bootstrap,carousel,Angularjs,Angular Ui Bootstrap,Carousel,我正在尝试使用carousel指令,但出现了两个错误 第一个错误: Unknown provider: $animateCssProvider <- $animateCss <- .item-animation TypeError: $animate.on is not a function "bootstrap": "*", "angular": ">=1.4.0", "grunt-angular-templates": "1.0.4", "angular-animate

我正在尝试使用carousel指令,但出现了两个错误

第一个错误:

Unknown provider: $animateCssProvider <- $animateCss <- .item-animation
TypeError: $animate.on is not a function
"bootstrap": "*",
"angular": ">=1.4.0",
"grunt-angular-templates": "1.0.4",
"angular-animate": "1.4.0",
"angular-translate": "^2.7.0",
"angular-ui-bootstrap": "^1.2.4",
"checklist-model": "*",
"numeral": "*",
"angular-numeraljs": "^1.0"
var estateCarouselController = presentation.controller('estateCarouselController',['$scope',function($scope){
$scope.myInterval = 3000;
$scope.noWrapSlides = false;
$scope.active = 0;
$scope.slides = [
    {
        image: 'http://lorempixel.com/400/200/'
    },
    {
        image: 'http://lorempixel.com/400/200/food'
    },
    {
        image: 'http://lorempixel.com/400/200/sports'
    },
    {
        image: 'http://lorempixel.com/400/200/people'
    }
];
}
<uib-carousel active="0" interval="myInterval">
        <uib-slide ng-repeat="slide in slides" index="$index">
            <img ng-src="{[{slide.image}]}" style="margin:auto;" />
            <div class="carousel-caption">
                <h4>Slide {[{$index+1}]}</h4>
            </div>
        </uib-slide>
    </uib-carousel>
package.json:

Unknown provider: $animateCssProvider <- $animateCss <- .item-animation
TypeError: $animate.on is not a function
"bootstrap": "*",
"angular": ">=1.4.0",
"grunt-angular-templates": "1.0.4",
"angular-animate": "1.4.0",
"angular-translate": "^2.7.0",
"angular-ui-bootstrap": "^1.2.4",
"checklist-model": "*",
"numeral": "*",
"angular-numeraljs": "^1.0"
var estateCarouselController = presentation.controller('estateCarouselController',['$scope',function($scope){
$scope.myInterval = 3000;
$scope.noWrapSlides = false;
$scope.active = 0;
$scope.slides = [
    {
        image: 'http://lorempixel.com/400/200/'
    },
    {
        image: 'http://lorempixel.com/400/200/food'
    },
    {
        image: 'http://lorempixel.com/400/200/sports'
    },
    {
        image: 'http://lorempixel.com/400/200/people'
    }
];
}
<uib-carousel active="0" interval="myInterval">
        <uib-slide ng-repeat="slide in slides" index="$index">
            <img ng-src="{[{slide.image}]}" style="margin:auto;" />
            <div class="carousel-caption">
                <h4>Slide {[{$index+1}]}</h4>
            </div>
        </uib-slide>
    </uib-carousel>
控制器:

Unknown provider: $animateCssProvider <- $animateCss <- .item-animation
TypeError: $animate.on is not a function
"bootstrap": "*",
"angular": ">=1.4.0",
"grunt-angular-templates": "1.0.4",
"angular-animate": "1.4.0",
"angular-translate": "^2.7.0",
"angular-ui-bootstrap": "^1.2.4",
"checklist-model": "*",
"numeral": "*",
"angular-numeraljs": "^1.0"
var estateCarouselController = presentation.controller('estateCarouselController',['$scope',function($scope){
$scope.myInterval = 3000;
$scope.noWrapSlides = false;
$scope.active = 0;
$scope.slides = [
    {
        image: 'http://lorempixel.com/400/200/'
    },
    {
        image: 'http://lorempixel.com/400/200/food'
    },
    {
        image: 'http://lorempixel.com/400/200/sports'
    },
    {
        image: 'http://lorempixel.com/400/200/people'
    }
];
}
<uib-carousel active="0" interval="myInterval">
        <uib-slide ng-repeat="slide in slides" index="$index">
            <img ng-src="{[{slide.image}]}" style="margin:auto;" />
            <div class="carousel-caption">
                <h4>Slide {[{$index+1}]}</h4>
            </div>
        </uib-slide>
    </uib-carousel>
标记:

Unknown provider: $animateCssProvider <- $animateCss <- .item-animation
TypeError: $animate.on is not a function
"bootstrap": "*",
"angular": ">=1.4.0",
"grunt-angular-templates": "1.0.4",
"angular-animate": "1.4.0",
"angular-translate": "^2.7.0",
"angular-ui-bootstrap": "^1.2.4",
"checklist-model": "*",
"numeral": "*",
"angular-numeraljs": "^1.0"
var estateCarouselController = presentation.controller('estateCarouselController',['$scope',function($scope){
$scope.myInterval = 3000;
$scope.noWrapSlides = false;
$scope.active = 0;
$scope.slides = [
    {
        image: 'http://lorempixel.com/400/200/'
    },
    {
        image: 'http://lorempixel.com/400/200/food'
    },
    {
        image: 'http://lorempixel.com/400/200/sports'
    },
    {
        image: 'http://lorempixel.com/400/200/people'
    }
];
}
<uib-carousel active="0" interval="myInterval">
        <uib-slide ng-repeat="slide in slides" index="$index">
            <img ng-src="{[{slide.image}]}" style="margin:auto;" />
            <div class="carousel-caption">
                <h4>Slide {[{$index+1}]}</h4>
            </div>
        </uib-slide>
    </uib-carousel>

确保在模块声明angular.module(“app”、[“shared”、“ui.bootstrap”])中具有正确的依赖项;正如@fireydude所说的,也不要忘记ngAnimate。可能是来自
ngAnimate
$animate
不可用。共享什么?这是ngAnimate创建的依赖项吗?我是ofc,模块中包括ngAnimate。这些版本可以吗?您还需要ui.bootstrap。您应该发布模块声明Edited以获得更多澄清确保在模块声明angular.module(“app”、[“shared”、“ui.bootstrap”])中具有正确的依赖项;正如@fireydude所说的,也不要忘记ngAnimate。可能是来自
ngAnimate
$animate
不可用。共享什么?这是ngAnimate创建的依赖项吗?我是ofc,模块中包括ngAnimate。这些版本可以吗?您还需要ui.bootstrap。您应该发布模块声明Edited以获得更多澄清