Yas*_*ain 5 typescript smartadmin angular5
我angular2-highcharts在Angular Project上安装了该程序。它的工作,但在ng serve模式下。但是当我执行命令时ng build --prod。我得到了错误:
模板编译时出错 AppModule
装饰器中不支持函数调用,但ChartModule已被调用。
我执行死刑时工作正常ng build。
这是我的 app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { NgModule } from '@angular/core';
import { ChartModule } from 'angular2-highcharts';
import { AppComponent } from './app.component';
import { HttpModule } from '@angular/http';
declare var require : any;
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,HttpModule,
ChartModule.forRoot(require('highcharts/highstock'),require('highcharts/modules/drilldown')),
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
platformBrowserDynamic().bootstrapModule(AppModule);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1322 次 |
| 最近记录: |