Skip to content

Commit

Permalink
version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
asafdav committed Aug 12, 2015
1 parent afb17b9 commit 864c6ee
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
9 changes: 6 additions & 3 deletions build/ng-csv.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,10 @@ angular.module('ngCsv.services').

infoArray = [];

angular.forEach(row, function (field, key) {
this.push(that.stringifyField(field, options));
var iterator = !!options.columnOrder ? options.columnOrder : row;
angular.forEach(iterator, function (field, key) {
var val = !!options.columnOrder ? row[field] : field;
this.push(that.stringifyField(val, options));
}, infoArray);

dataString = infoArray.join(options.fieldSep ? options.fieldSep : ",");
Expand Down Expand Up @@ -193,6 +195,7 @@ angular.module('ngCsv.directives').
data: '&ngCsv',
filename: '@filename',
header: '&csvHeader',
columnOrder: '&csvColumnOrder',
txtDelim: '@textDelimiter',
decimalSep: '@decimalSeparator',
quoteStrings: '@quoteStrings',
Expand Down Expand Up @@ -230,7 +233,7 @@ angular.module('ngCsv.directives').
addByteOrderMarker: $scope.addByteOrderMarker
};
if (angular.isDefined($attrs.csvHeader)) options.header = $scope.$eval($scope.header);

if (angular.isDefined($attrs.csvColumnOrder)) options.columnOrder = $scope.$eval($scope.columnOrder);

options.fieldSep = $scope.fieldSep ? $scope.fieldSep : ",";

Expand Down
4 changes: 2 additions & 2 deletions build/ng-csv.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ng-csv",
"version": "0.3.3",
"version": "0.3.4",
"main": "build/ng-csv.min.js",
"description": "Simple directive that turns arrays and objects into downloadable CSV files",
"repository": {
Expand Down

0 comments on commit 864c6ee

Please sign in to comment.