Bootstrap轮播工作,但仍然在控制台中显示[$ compile:ctreq]

时间:2015-09-28 16:06:32

标签: angularjs twitter-bootstrap

我想在我的angularjs网站上使用bootstrap carousel。旋转木马工作正常。但是我在控制台中遇到了很多错误。如果从轮播中删除标记,则不会显示错误。

轮播HTML

<div id="myCarousel" class="carousel slide" data-ride="carousel">
  <div class="carousel-inner" role="listbox">
    <div class="item" ng-repeat="image in images" ng-class="{'active': $index==0}">
        <div class="container" style="width:100%;background:url('{{image.coverImage}}') no-repeat;min-height:350px;background-size:cover;background-position: center;">
        </div>
    </div>
  </div>
  <a class="left carousel-control" href="#myCarousel" 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="#myCarousel" role="button" data-slide="next">
    <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
    <span class="sr-only">Next</span>
  </a>
</div>

控制台出错

  

错误:[$ compile:ctreq]   http://errors.angularjs.org/1.2.28/ $编译/ ctreq P0 =转盘&安培; P1 =滑动       在错误(本机)       在http://localhost:3000/lib/angular/angular.min.js:6:450       at t(http://localhost:3000/lib/angular/angular.min.js:51:369)       在J(http://localhost:3000/lib/angular/angular.min.js:54:409)       在http://localhost:3000/lib/angular/angular.min.js:61:96       在http://localhost:3000/lib/angular/angular.min.js:72:199       在l.promise.then.J(http://localhost:3000/lib/angular/angular.min.js:101:96)       在l.promise.then.J(http://localhost:3000/lib/angular/angular.min.js:101:96)       在http://localhost:3000/lib/angular/angular.min.js:102:259       在h.a. $ get.h. $ eval(http://localhost:3000/lib/angular/angular.min.js:113:32

这是什么意思?这是否会导致网站功能出现任何问题?

1 个答案:

答案 0 :(得分:0)

使用角度构建时忘记引导程序的javascript。仅使用css.E尤其是在使用ngRoute.It从url.For轮播读取哈希时,使用ui.bootstrap.carousel,阅读文档并查看显示的示例在页面上。它简单明了。否则控制台总会出现错误,即旋转木马是否有效。This is the official page 希望这会有所帮助。