FERNman / angular-google-charts

A wrapper for the Google Charts library written in Angular.
Other
273 stars 107 forks source link

NullInjectorError: StaticInjectorError(AppModule)[GoogleChartComponent -> DataTableService #247

Closed EduardoCLlamas closed 1 month ago

EduardoCLlamas commented 3 years ago

Bug Report

In the latest version of the module (2.2.2) it indicates the following error:

ERROR NullInjectorError: StaticInjectorError(AppModule)[GoogleChartComponent -> DataTableService]: StaticInjectorError(Platform: core)[GoogleChartComponent -> DataTableService]: NullInjectorError: No provider for DataTableService!

I imported the indicated provider, as follows:

import {DataTableService} from "angular-google-charts/lib/services/data-table.service";

But angular tells me the following message:

Module not found: Error: Can't resolve 'angular-google-charts/lib/services/data-table.service'

any ideas how to solve this?

Note: It is worth mentioning that it apparently works in version 2.0.0

martypitt commented 2 years ago

Just hit this issue too - any advice?

AlmaniaM commented 2 years ago

Is this still an issue? The DataTableService is not being exported in the index.ts file so I don't see how you would be able to import it. I don't see a lib/services folder in v2.0.0 either.

FERNman commented 1 month ago

I'll remove the DataTableService in the next release and replace it with a simple function. However, the functionality is so simple you can just copy it and adapt it to fit your needs.