Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot compile angular2-fusioncharts with --aot --prod #16

Closed
SpiderPork opened this issue Jun 8, 2017 · 3 comments
Closed

Cannot compile angular2-fusioncharts with --aot --prod #16

SpiderPork opened this issue Jun 8, 2017 · 3 comments
Labels
wrapper bug Issue is caused due to a problem in the wrapper

Comments

@SpiderPork
Copy link

When I try to compile angular2-fusioncharts with --aot --prod, I get this error message:

ERROR in ......./node_modules/angular2-fusioncharts/src/fusioncharts.component.ngfactory.ts (32,72): Property 'containerId' is private and only accessible within class 'FusionChartsComponent'.

Angular version: 4.1.3

@rousan
Copy link
Contributor

rousan commented Dec 5, 2017

@SpiderPork
Try to use the latest version of angular2-fusioncharts and use fcRoot() method instead of forRoot() as follows:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

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

// Import angular2-fusioncharts
import { FusionChartsModule } from 'angular2-fusioncharts';

// Import FusionCharts library and chart modules
import * as FusionCharts from 'fusioncharts';
import * as Charts from 'fusioncharts/fusioncharts.charts';
import * as FintTheme from 'fusioncharts/themes/fusioncharts.theme.fint';

// Pass the fusioncharts library and chart modules
FusionChartsModule.fcRoot(FusionCharts, Charts, FintTheme);

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    // Specify FusionChartsModule as import
    FusionChartsModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

@rousan rousan closed this as completed Dec 5, 2017
@SpiderPork
Copy link
Author

OK thanks

@rousan
Copy link
Contributor

rousan commented Dec 5, 2017

My pleasure

@rousan rousan added wrapper bug Issue is caused due to a problem in the wrapper duplicate and removed duplicate labels Dec 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wrapper bug Issue is caused due to a problem in the wrapper
Projects
None yet
Development

No branches or pull requests

2 participants