0

HTMLテーブルをテキストファイルにエクスポートする必要があるプロジェクトに取り組んでいます。以下は、HTML コードの簡略版です。

<table>
    <thead>
        <tr>
            <th>Code</th>
            <th>First Name</th>
            <th>Last Name</th>
            <th>Age</th>
            <th>Date1</th>
            <th>Date2</th>
        </tr>
    </thead>
    <tbody>
        <tr ng-repeat="employee in employees">
            <td>{{employee.code}}</td>
            <td>{{employee.firstName}}</td>
            <td>{{employee.lastName}}</td>
            <td>{{employee.age}}</td>
            <td><input type="text"  class="datepicker" ng-model="employee.date1"  datepicker /></td>
            <td><input type="text"  class="datepicker" ng-model="employee.date2" datepicker/></td>
        </tr>
    </tbody>
</table>

期待される結果は、テキスト ファイルでは次のようになります (列が適切に配置されています)。

Code   firstName    lastName  Age        Date1         Date2
001       x            y      25      2016/01/01      2016/04/04
...

jqueryで「古典的な」方法を試しましたが、td内の値を解釈しません。そのため、このような問題を克服するために、角度のあるディレクティブまたはそのようなものを探しています。ありがとう..

4

1 に答える 1