I am trying to add a Simpl5 javascript library to my gateway unsuccessfully. I added SIPml-api.js and SIPml.js to the webapp / content / scripts folder .
In .angular-cli.json I have an array of update scripts, for example:
"scripts": [
"content/scripts/SIPml-api.js",
"content/scripts/SIPml.js"
]
Then I try to call SIPml in the component as follows:
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');
}
I get ERROR ReferenceError: SIPml is not defined in the console.
Can anyone help?
source
share