英文:
Module '"angular2-csv"' has no exported member 'Angular2Csv'.ts(2305)
问题
我正在尝试在我的Angular 15应用程序中使用Angular2csv包。我有一个导出服务,在其中我已经导入了它:
import { Angular2Csv } from 'angular2-csv';
这个服务在我的共享模块中提供。在共享模块中,我还将Angular2CsvModule添加到了导入数组中。但是当我编译代码时出现错误。请帮忙解决这个问题。
英文:
I am trying to use Anguar2csv package in my angular 15 application. I have a export service where I have imported it:
import { Angular2Csv } from 'angular2-csv';
This service is provided in my shared module. And in that shared module I have kept the Angular2CsvModule also in imports array. But the error occurs when I am compiling the code. Please help how to resolve this.
答案1
得分: 1
"anguar2-csv"最初是为Angular 6构建的,不再与Ivy编译的应用程序兼容。
尝试使用这个分支而不是 https://www.npmjs.com/package/export-to-csv
它提取了功能并移除了与Angular相关的部分。
英文:
anguar2-csv was originally build for angular 6 and no longer work with Ivy compiled applications.
try using this fork instead https://www.npmjs.com/package/export-to-csv
it extracted the functionality and removed the angular related part
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论