我正在使用工厂下载文件csv并将其解析为数组。 我正在尝试使用angular-csv-import将我的字符串解析为数组。 我的字符串看起来像:
name,total,table,active↵דווד,2,1,↵יוליקגו...,↵בוריסוטניה,2,25, ↵גיצהאיגור,2,25 .....
我的代码是:
DownloadFile.all().then(function (fileArray) {
$scope.csv = {
content: fileArray,
header: true,
headerVisible: true,
separator: ',',
separatorVisible: true,
result: null,
encoding: 'ISO-8859-1',
encodingVisible: true
};
然后我正在使用:
$scope.$watch('csv.result', function () {
if ($scope.csv.result != null) {
我看不出结果是开枪...... 也许还有其他库可以将我的字符串格式化为普通数组