How to call function expression of JavaScript from angular 7?
My problem is similar to this
here is my test.js
:
'use strict';
var val = (function() {
function launch() {
console.log("val");
};
return {
launch: launch
};
})();
I wanna call launch method from Angular Typescript I am trying as:
declare var val2: any;
ngOnInit() {
val.launch();
}