gevgeny / angular2-highcharts

:bar_chart: :chart_with_upwards_trend: Highcharts for your Angular project
MIT License
379 stars 113 forks source link

Uncaught Error: Can't resolve all parameters for HighchartsService: (?) #250

Open TroyTaylor opened 6 years ago

TroyTaylor commented 6 years ago

On app.module.ts I have:

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';
import { HttpModule, JsonpModule } from '@angular/http';
import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';

import { ChartModule } from 'angular2-highcharts';

import { AppComponent } from './app.component';

import { APP_CONFIG, TagVal_AppConfig } from './app.config';

import { AppRoutingModule } from './app-routing.module';
import { TradePageComponent } from './components/trade-page/trade-page.component';
@NgModule({
    imports: [
        BrowserModule,
        AppRoutingModule,
        FormsModule,
        HttpModule,
        HttpClientModule,
        ChartModule.forRoot(require('highcharts')),
        JsonpModule,
    ],
    declarations: [
        AppComponent,
        TradePageComponent,
    ],
    providers: [
        { provide: APP_CONFIG, useValue: TagVal_AppConfig },
    ],
    bootstrap:    [ AppComponent ],
})
export class AppModule { }

I also import ChartModule on the component I'm trying to put my chart in, but I get this error: Uncaught Error: Can't resolve all parameters for HighchartsService: (?).

I don't a site to run it live, but my project is here: https://github.com/TroyTaylor/binance-app