0

I have upgraded angular 6 to angular 15 lately, in that I have one js file like the below:

var someVar = function(){
    window = this;
    return {
        test1: function() {
           ...
        },
  
        test2: function(callback, source_origin) {
            console.log("here");
           ...
        }
    };
}();

This file is declared in the angular.json in the script array having it under the assets folder, in my .ts file I am using as below:

declare var someVar: any;

     someVar.test1((m: any) => this.resizeM1(m), url1);
     someVar.test2((m: any) =>  this.resizeM2(m) , url2);

this is working in angular 6, but not working in angular 15, Is there any difference as such while calling this function in terms of angular 15?

If I use console.log inside resizeM1 function it never gets called, and the same for reszieM2 function.

Dev Developer
  • 115
  • 2
  • 13

0 Answers0