这是我在Angular2-RC6中使用angular2-google-chart时收到的错误。任何帮助将不胜感激
zone.js:484 Unhandled Promise rejection: Error in http://localhost:4200/app/home/dashboard/piechart.component.html:3:25 caused by: google is not defined ; Zone: angular ; Task: Promise.then ; Value: ViewWrappedError {_nativeError: Error: Error in http://localhost:4200/app/home/dashboard/piechart.component.html:3:25 caused by: goo…, originalError: ReferenceError: google is not defined
at GoogleChart.ngOnInit (http://localhost:4200/app/directi…, context: DebugContext} ReferenceError: google is not defined
at GoogleChart.ngOnInit (http://localhost:4200/app/directives/angular2-google-chart.directive.js:21:13)
at DebugAppView._View_PiechartComponent0.detectChangesInternal (PiechartComponent.ngfactory.js:105:80)
at DebugAppView.AppView.detectChanges (http://localhost:4200/vendor/@angular/core/bundles/core.umd.js:12061:18)
at DebugAppView.detectChanges (http://localhost:4200/vendor/@angular/core/bundles/core.umd.js:12166:48)
at DebugAppView.AppView.detectViewChildrenChanges (http://localhost:4200/vendor/@angular/core/bundles/core.umd.js:12087:23)
at DebugAppView._View_DashboardComponent0.detectChangesInternal (DashboardComponent.ngfactory.js:270:8)
at DebugAppView.AppView.detectChanges (http://localhost:4200/vendor/@angular/core/bundles/core.umd.js:12061:18)
at DebugAppView.detectChanges (http://localhost:4200/vendor/@angular/core/bundles/core.umd.js:12166:48)
at DebugAppView.AppView.detectViewChildrenChanges (http://localhost:4200/vendor/@angular/core/bundles/core.umd.js:12087:23)
at DebugAppView._View_DashboardComponent_Host0.detectChangesInternal (DashboardComponent_Host.ngfactory.js:31:8)
这是我的组件HTML模板,用于相同的
<!--Google charts-->
<!--Div that will hold the pie chart-->
<div>
<div id="line_chart" [chartData]="line_ChartData" [chartOptions]= "line_ChartOptions" chartType="LineChart" GoogleChart></div>
</div>