LoginSignup
5
5

More than 5 years have passed since last update.

angular-ui/bootstrapのcarouselが動かない

Posted at

ngAnimateと干渉するという既知の問題がある。carousel要素のところだけngAnimateを無効にすれば動くようになる。

上のリンクの通りだけど、CSの場合はこういう感じ。

  .directive 'setNgAnimate', [
    '$animate',
    ($animate) ->
      ($scope, $element, $attrs) ->
        $scope.$watch ->
          $scope.$eval($attrs.setNgAnimate, $scope)
        , (newValue, oldValue) ->
          $animate.enabled(!!newValue, $element)
  ]
carousel set-ng-animate="false"
  slide ng-repeat="slide in slides"
    / slide
5
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5