我试图将
Simpl5 javascript库添加到我的网关失败.
我把SIPml-api.js和SIPml.js放在webapp / content / scripts文件夹中.
我把SIPml-api.js和SIPml.js放在webapp / content / scripts文件夹中.
在.angular-cli.json我更新了脚本数组,如下所示:
"scripts": [ "content/scripts/SIPml-api.js","content/scripts/SIPml.js" ]
然后我尝试在组件中调用SIPml,如下所示:
import { Component,OnInit } from '@angular/core'; declare var SIPml: any;
.
ngOnInit() { SIPml.setDebugLevel((window.localStorage && window.localStorage.getItem('org.doubango.expert.disable_debug') === 'true') ? 'error' : 'info'); }
我收到ERROR ReferenceError:控制台中未定义SIPml.
有人可以帮忙吗?