Newbie question - 1st day using Elf #533
Unanswered
miguelisidoro
asked this question in
Q&A
Replies: 1 comment
-
You are instantiating |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have implemented a Elf Store following instructions at https://ngneat.github.io/elf/docs/store and https://ngneat.github.io/elf/docs/features/entities-management/entities. I am using the Repository pattern:
Here is the code of my repository class.
Here is the code, calling the repository class:
const handleLoadData = async () => {
//read csv file
const fileContent = await file?.text();
const arr = parseCSV(fileContent || "");
const teports = convertStringArrayToReportArray(arr);
if (
reportRepository.allReports() &&
reportRepository.allReports().length === 0
) {
reportRepository.addReports(reports);
}
console.log(arr);
console.log(reports);
};
I have no console log errors but my store is not filled with the data I am trying to put there.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions