Ionic google charts error: (void 0) is not a function


#1

error :

I want to add google charts and follow this https://www.npmjs.com/package/angular2-google-chart

but give me error ; Uncaught TypeError: (void 0) is not a function

how can i solve this problem ? Thanx to now

Edited post and add app.module.ts

app.module.ts;

import { NgModule, ErrorHandler } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { MyApp } from './app.component';

import { KanalolusturPage } from '../pages/kanalolustur/kanalolustur';
import { KanalPage } from '../pages/kanallistele/kanallistele';
import { TabsPage } from '../pages/tabs/tabs';
import { GetlerPage } from '../pages/getler/getler';
import { PostlarPage } from '../pages/postlar/postlar';
import { UyelikPage } from '../pages/uyelik/uyelik';
import { ElementolusturPage } from '../pages/elementolustur/elementolustur';
import { VerilerPage } from '../pages/veriler/veriler';

import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { DbProvider } from '../providers/db/db';
import { IonicStorageModule } from '@ionic/storage';
import { HttpModule } from '@angular/http';
import { SQLitePorter } from '@ionic-native/sqlite-porter';
import { SQLite } from '@ionic-native/sqlite';
import { TaskServiceProvider } from '../providers/task-service/task-service'
//import { ChartModule } from 'angular2-highcharts';
//import * as highcharts from 'Highcharts';
import {GoogleChart} from 'angular2-google-chart/directives/angular2-google-chart.directive';


@NgModule({
  declarations: [
    MyApp,
    KanalolusturPage,
    KanalPage,
    TabsPage,
    GetlerPage,
    PostlarPage,
    UyelikPage,
    ElementolusturPage,
    VerilerPage,
    GoogleChart
  ],
  imports: [
    BrowserModule,
    HttpModule,
    IonicModule.forRoot(MyApp),
    IonicStorageModule.forRoot(),
    //ChartModule.forRoot(highcharts),
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    KanalolusturPage,
    KanalPage,
    TabsPage,
    GetlerPage,
    PostlarPage,
    UyelikPage,
    ElementolusturPage,
    VerilerPage,
  ],
  providers: [
    StatusBar,
    SplashScreen,
    {provide: ErrorHandler, useClass: IonicErrorHandler},
    DbProvider,
    DbProvider,
    SQLitePorter,
    SQLite,
    TaskServiceProvider,
  ]
})
export class AppModule {}

How to add google charts in ionic project
#2

What is this?

Did you follow the usage example? https://github.com/vimalavinisha/angular2-google-chart#usage


#3

yes I followed this example

this example say ;

3 In app.module.ts, make the following additions

import {GoogleChart} from ‘angular2-google-chart/directives/angular2-google-chart.directive’;


#6

Did you actually solve this issue? I cannot see a functional answer in the thread.

do you have a repository on github?