我对两个可扩展的行进行了硬编码,它们工作正常。但是,当我尝试引入ng-repeat时,行将不再扩展。
工作版本:https://jsbin.com/tiwufiz/3/edit?html,js,console,output
ng-repeat版本:https://jsbin.com/tiwufiz/5/edit?html,js,console,output
在ng-repeat版本中,我要做的就是删除第二行,引入ng-repeat并在标题上完成ng-binding ...
<div class="row" ng-repeat="tut in demo.tutorials">
<div class="col-md-2"></div>
<div class="col-md-8">
<button class="collapsible">{{tut.title}}</button>
<div class="content">
<video class="video-js vjs-big-play-centered" controls preload="false" width="640" height="264"
style="display:block; margin: 0 auto">
<source src="resources/comercial.mp4" type="video/mp4">
<p class="vjs-no-js">
To view this video please enable JavaScript, and consider upgrading to a web browser that
<a href="https://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a>
</p>
</video>
<div class="mt10 mb10">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
</div>
</div>
</div>
</div>
答案 0 :(得分:0)
已修复
我将for循环包装在$ timeout(零秒)内