无法读取属性' offsetwidth'未定义的bootstrap轮播

时间:2016-09-01 17:22:45

标签: javascript jquery css angularjs twitter-bootstrap

我已经使用角度JS实现了一个bootstrap轮播但是我注意到有时候我得到一个错误" bootstrap.min.js:6 Uncaught TypeError:无法读取属性' offsetwidth'未定义的bootstrap轮播"当我尝试单击控件时滑块停止工作,但有时它工作得很好。

有人可以帮助我吗

<div class="top" ng-show = "open_popup"  tabindex="-1" >
  <div id="myCarousel1" class="slider carousel slide" data-ride="carousel">
    <!-- <i class="fa fa-times closePopup" aria-hidden="true" ng- click = "closePopup();"></i> -->                   <div class="carousel-inner" role="listbox">                        
    <div class="item" ng-repeat="image in carouselimages" ng-if="open_popup" ng-class="{active:$index == carouselImageActive}">
      <img ng-src="./uploads/{{image.imagename}}">
    </div>
    </div>
  </div>
  <a class="left carousel-control" href="#myCarousel1" role="button" data-slide="prev">
    <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
    <span class="sr-only">Previous</span>
  </a>
  <a class="right carousel-control" href="#myCarousel1" role="button" data-slide="next">
    <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
    <span class="sr-only">Next</span>
  </a>
</div>   

0 个答案:

没有答案