From ee959a2e0cc4365a18e800eb6a2520422f7b16f1 Mon Sep 17 00:00:00 2001 From: Damien GUERIN Date: Fri, 21 Feb 2014 11:07:53 +0100 Subject: [PATCH] Correction : without filter, the first row is not exported --- ng-table-export.src.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ng-table-export.src.js b/ng-table-export.src.js index 4649845..4df8c35 100644 --- a/ng-table-export.src.js +++ b/ng-table-export.src.js @@ -29,12 +29,10 @@ angular.module('ngTableExport', []) if (tds.length == 0) { tds = tr.find('td'); } - if (i != 1) { - angular.forEach(tds, function(td, i) { + angular.forEach(tds, function(td, i) { rowData += csv.stringify(angular.element(td).text()) + ';'; }); rowData = rowData.slice(0, rowData.length - 1); //remove last semicolon - } data += rowData + "\n"; }); }, @@ -45,4 +43,4 @@ angular.module('ngTableExport', []) $parse(attrs.exportCsv).assign(scope.$parent, csv); } }; -}]); \ No newline at end of file +}]);