Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/437.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何迭代角度数据表中的筛选行_Javascript_Angularjs_Datatables - Fatal编程技术网

Javascript 如何迭代角度数据表中的筛选行

Javascript 如何迭代角度数据表中的筛选行,javascript,angularjs,datatables,Javascript,Angularjs,Datatables,比方说,我有一个简单的数据表 <table datatable="" dt-options="dtOptions" dt-column-defs="dtColumnDefs" class="row-border hover"> <thead> <th>ID</th> <th>Name</th>

比方说,我有一个简单的数据表

            <table datatable="" dt-options="dtOptions" dt-column-defs="dtColumnDefs" class="row-border hover">
                <thead>
                    <th>ID</th>
                    <th>Name</th>
                </thead>
                <tbody>
                    <tr ng-repeat"reservation in reservations">
                        <td>{{reservation.ID}}</td><td>{{reservation.name}}</td>
                    </tr>
                </tbody>
            </table>    

身份证件
名称
{{reservation.ID}{{reservation.name}
当我将一些字符串放入搜索框时,datatable正在被过滤。现在我想在过滤的行上以角度进行迭代,并将ID读取到数组中。如何处理这个问题?我可以使用jquery,但我不想把代码弄乱。

$scope.addressDTInstance={};
var j=$scope.addressDTInstance.DataTable.rows()

对我来说是有效的:
$scope.dtInstance.DataTable.rows({search:'applied'}).data()

所以你想要一个搜索框(作为一个过滤器),它将显示过滤的ID(基于搜索框的文本)?DataTable库已经有了一个过滤器框。我想得到经过过滤的身份证