在angular 4打字稿上加载外部网络库

时间:2018-12-05 10:49:42

标签: javascript angular typescript

我正在尝试加载Spotfire javascript API库:

     

我无法在index.html中执行此操作,因为该URL必须保存到我的environment.ts文件中。

我尝试使用以下代码调用此api:

System.import('https://spotfire-next.cloud.tibco.com/spotfire/wp/GetJavaScriptApi.ashx?Version=7.5').then(file => {
   // perform additional interactions after the resource has been asynchronously fetched
});

但是出现错误“无法关闭模块”。

你能帮我吗?

谢谢

0 个答案:

没有答案