gpt4 book ai didi

css - AngularJS - 可扩展行不适用于 ng-repeat

转载 作者:行者123 更新时间:2023-11-28 00:00:36 25 4
gpt4 key购买 nike

我硬编码了两个可以正常工作的可扩展行。但是,当我尝试引入 ng-repeat 时,行将不再扩展。

工作版本:https://jsbin.com/tiwufiz/3/edit?html,js,console,output

ng-重复版本: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>

最佳答案

固定

我将 for 循环包装在 $timeout(零秒)内

关于css - AngularJS - 可扩展行不适用于 ng-repeat,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56004637/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com