Epotignano / angular-export-table

Allow us us to export an HTML table to different types of documents.
13 stars 8 forks source link

Working problems #7

Open valentindegrange opened 8 years ago

valentindegrange commented 8 years ago

Hello,

I'm trying to use the directive you have created but I'm facing some issue with understanding how it works.

Here is my export button (based on your readme) : <button class="table-export" table-selector="'toto'" export-options="{type: 'pdf', escape: true, tableName: 'toto' }"> Export </button>

And this is the table I am looking to export :

    <table id="toto" class="table table-hover">
        <thead>
            <tr>
                <th>1</th>
                <th>2</th>
                <th>3</th>
            </tr>
        </thead>
        <tbody>
            <tr ng-repeat="data in details.chartData">
                <td>{{details.datasource.name}}</td>
                <td>{{data.x}}</td>
                <td>{{data.y}}</td>
            </tr>
        </tbody>
    </table>

I thought I should use the id of my table in my table-selector but it doesn't seems to work. Do you have any idea why ?

Thank you very much

Valentin

Epotignano commented 8 years ago

It shoud be working, could you upload a JSFiddle with this issue for debug?

kemany55 commented 8 years ago

but what do you do with the ng-repeat ID's ? I tried to give the table selector an expression like {{$index}} It didnt work ? Example: