【发布时间】:2020-05-29 01:36:11
【问题描述】:
这是第 3 方脚本文件 jsfiddle example link 的链接,但在该外部文件中是第 3 方 js 脚本文件,它的所有函数都是自调用函数。
如何在 ts 文件中声明该函数?
在 ts 文件中声明变量后,我需要调用下面的 3rd 方函数。
affirm.checkout.open({
success: function (card_details) {
console.log('#### calling affirm.checkout.open');
},
error: function (error_response) {
console.log('#### calling affirm.checkout.open Error =======');
},
checkout_data: ObjectData;
});
在运行应用程序时获取ERROR in src/app/components/checkout/checkout.component.ts(1572,5): error TS2304: Cannot find name 'affirm'.
谁能帮帮我。
【问题讨论】:
标签: angular typescript angular-cli angular-cli-v6