ionic 2 google charts Uncaught TypeError: (void 0) is not a function

浪尽此生 提交于 2019-12-13 16:23:11

问题


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

I can't solve this problem until today

how can i solve this problem ? Thanx to now

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 { 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 {}

来源:https://stackoverflow.com/questions/45375134/ionic-2-google-charts-uncaught-typeerror-void-0-is-not-a-function

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!