【问题标题】:AngularJS - Expandable rows not working with ng-repeatAngularJS - 可扩展行不适用于 ng-repeat
【发布时间】:2019-09-24 01:20:57
【问题描述】:

我已经硬编码了两个可以正常工作的可扩展行。但是,当我尝试引入 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>

【问题讨论】:

    标签: css angularjs html angularjs-ng-repeat video.js


    【解决方案1】:

    已修复

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

    【讨论】:

      猜你喜欢
      • 2016-05-27
      • 1970-01-01
      • 1970-01-01
      • 2014-09-01
      • 1970-01-01
      • 2020-06-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多