日复一日,... 使用一段时间后,Google Charts 停止加载我的 ANGULAR 项目。 现在我处于开发模式,我的项目正在本地主机中运行。
我的浏览器控制台显示如下:
angular-google-charts.js:152 GET https://www.gstatic.com/charts/loader.js net::ERR_CERT_AUTHORITY_INVALID angular-google-charts.js:132 Failed to load the google chart script! core.js:4002 ERROR Failed to load the google chart script!
在此之后,我的一些 Google 服务(通过 Google Visualization API(?))就停止工作,即 Google map ,直到第二天。 我认为这与谷歌方面的访问限制有关,但我不确定为什么会发生这种情况,更重要的是如何解决这个问题。 请问这里有什么想法吗?
最佳答案
确保您已经使用 npm 安装了库
npm install angular-google-charts
将其导入到您的modules.ts文件中
import { GoogleChartsModule } from 'angular-google-charts';
@NgModule({
...
imports: [
...
GoogleChartsModule.forRoot(),
...
],
...
})
export class AppModule {}
关于javascript - Google 图表的访问限制,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58119117/