javascript - 在 Angular 4 打字稿上加载外部网络库
问题描述
我正在尝试加载我的 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
});
但是有一个错误“无法加载模块”。
你能帮助我吗 ?
谢谢
解决方案
推荐阅读
- javascript - 参数顺序无所谓?因为 TypeScript?
- nginx - 技术工作中如何显示另一个页面?
- python - 如何在 django 中验证电话号码?
- ccache - ccache - 所有文件都是“无输入文件”
- python - Scrapy 在里面找不到标签
- laravel - Laravel:用一个查询更新行
- postgresql - 如何在 Postgres 中按计算标准快速排序?
- php - 将文本从 json 对象替换为 php
- windows - nginx - 拒绝访问 Windows 上的静态内容
- azure - Palo Alto 背后的私有 DNS 无法解析名称服务器