TableExport icon indicating copy to clipboard operation
TableExport copied to clipboard

export with ng-repeat can't get value

Open yekeqiang opened this issue 8 years ago • 0 comments
trafficstars

@clarketm i use ng-repeat with tableExport,can't export the real data, get the var。

my import js:

<script type="text/javascript" src="/statics/tableExport/xls.core.min.js"></script>
<script type="text/javascript" src="/statics/tableExport/Blob.js"></script>
<script type="text/javascript" src="/statics/tableExport/FileSaver.js"></script>
<script type="text/javascript" src="/statics/tableExport/js/tableexport.js"></script>

the FileSaver version is: v1.3.6 the tableExport version is :v3.3.10

my code is:

       <table id="physicInfo" class="table table-bordered" datatable="ng">
                    <thead>
                    <tr>
                        <th>Physic</th>
                        <th>vm</th>
                        <th>BU</th>
                        <th>app</th>
                        <th>nodeGroup</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr ng-repeat="vm in transferHostMap track by $index" ng-model="transferHostMap" repeat-done="initDataTable()">
                        <td>{{vm.physicHostName}}</td>
                        <td>{{vm.vmHostName}}</td>
                        <td>{{vm.vmBu}}</td>
                        <td>{{vm.vmApp}}</td>
                        <td>{{vm.vmNodeGroup}}</td>
                    </tr>
                    </tbody>
                </table>

my get data:

Physic  vm  BU  app  nodeGroup
{{vm.physicHostName}}  {{vm.vmHostName}}  {{vm.vmBu}}  {{vm.vmApp}}  {{vm.vmNodeGroup}}
{{vm.physicHostName}}  {{vm.vmHostName}}  {{vm.vmBu}}  {{vm.vmApp}}  {{vm.vmNodeGroup}}

yekeqiang avatar Aug 23 '17 09:08 yekeqiang