Hello! I'm using the angular2 components and I'm facing a error is when I import ej components in app.modult.ts and will occur error like:" Cannot set property 'backGroundImageUrl' of undefined ; Zone: <root> ; Task: Promise.then ; Value: TypeError: Cannot set property 'backGroundImageUrl' of undefined" if I import the chart components.and here's the code:
import { NgModule } from "@angular/core";
import { BrowserModule } from '@angular/platform-browser';
import { RouterModule } from '@angular/router';
import { FormsModule } from '@angular/forms';
import { HttpModule, RequestOptions } from "@angular/http";
import { AppRequestOptions } from "./app.request";
import { AppRoutingModule } from "./app-routing.module";
import { AppComponent } from "./app.component";
import { EJ_CHART_COMPONENTS } from "./ej/chart.component";
@NgModule({
imports: [
BrowserModule,
FormsModule,
HttpModule,
AppRoutingModule
],
declarations: [
EJ_CHART_COMPONENTS,
AppComponent,
],
providers: [
{ provide: RequestOptions, useClass: AppRequestOptions }
],
bootstrap: [AppComponent]
})
export class AppModule { }
And My folder strucrure is like:
If I remove the import ej component part from app.module.ts then it works.
Is there any extra files I need to include?Thanks