角度UI模态中的无限滚动

时间:2015-02-18 12:31:24

标签: angularjs html5 angular-ui-bootstrap infinite-scroll

我试图在角度UI模式中使用无限滚动,模式在ng-template中定义,如下所示

                   <script type="text/ng-template" id="someID" >
  <div infinite-scroll="loadMoreEmployees()" infinite-scroll-distance="1">
            <div class="modal-header">
        <div class="vertical-margin row">
            <div class="col-lg-12">
                <h2 class="help-block">Departments assign</h2>
            </div>
        </div>
    </div>
    <div class="modal-body">
        <div class="content-container">
            <div class="col-lg-12 col-md-12 simple-data-table-content">
                <table data-ng-if="vm.employees!=null || vm.employees.length!=0" class="table table-condensed text-center clear-bottom">
                    <tbody>
                        <tr>
                            <th>Employee No</th>
                            <th>Employee Name</th>
                            <th>Email</th>
                            <th data-ng-repeat="DeptType in vm.DeptTypes track by $index">{{DeptType.name}}</th>
                            <th></th>
                        </tr>
                        <tr data-ng-if="vm.employees==null || vm.employees.length==0"><td colspan="{{vm.DeptTypes.length + 4}}"></td></tr>

                        <tr data-ng-repeat="employee in vm.employees | limitTo:vm.loadEmployeeLimitCount" data-ng-if="vm.employees!=null && vm.employees.length > 0">
                            <td class="">{{employee.employeeNumber}}</td>
                            <td class="">{{employee.name}}</td>
                            <td class="">{{employee.email}}</td>
                            <td class="" data-ng-repeat="DeptType in vm.DeptTypes">
                                <input type="text" only-digits data-ng-model="employee.DeptSummary[DeptType.id]" style="width:50px;" min="1" />
                            </td>
                        </tr>
                    </tbody>
                </table>

            </div>
        </div>
    </div>
</div>

但无限滚动因为不响应滚动动作,请指出我错在哪里。

0 个答案:

没有答案