bootstrap面板无法在角度

时间:2015-10-16 10:11:48

标签: angularjs twitter-bootstrap

我正试图围绕一系列上传的图像获得一个漂亮的边框。 我尝试了自举面板,可以让它们在Plunker中工作。

然而,当我尝试在我的角度应用程序中应用相同的代码时,它不起作用 - 没有面板出现:

<div ng-repeat="f in files track by $index">
      <div ng-show="f.type.indexOf('image') > -1">
      <div class="panel panel-primary"> 
      <img ngf-src="f" class="thumb">
          <button class= "btn btn-warning btn-cancel" ng-disabled="!myForm.$valid" 
              ng-click="cancelPic($index)">Cancel</button> 
          <br><br>
          <p>{{f.name}}</p>
          <br>
          <span class="progress" ng-show="f.progress >= 0">
            <div style="width:{{f.progress}}%" 
                  ng-bind="f.progress + '%'"></div>
          </span>
      </div>    
      </div>
      </div>

我想有一个明显的原因,但我没有找到它的运气。 我使用角度1.4.3和bootstrap 3.3.1与Plunk

相同

1 个答案:

答案 0 :(得分:0)

我错过了.panel-body类,如:

//To check if email and password match

奇怪的是我不需要Plunk中的.panel-body类,但是当我将它添加到应用程序时,它开始工作了。 C'est la vie。