Skip to content

Commit

Permalink
Correction : without filter, the first row is not exported
Browse files Browse the repository at this point in the history
  • Loading branch information
gigaga committed Feb 21, 2014
1 parent c9812f4 commit ee959a2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ng-table-export.src.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";
});
},
Expand All @@ -45,4 +43,4 @@ angular.module('ngTableExport', [])
$parse(attrs.exportCsv).assign(scope.$parent, csv);
}
};
}]);
}]);

0 comments on commit ee959a2

Please sign in to comment.