calling a normal javascript function from a typescripit file.
Assume that i have a javascript file names test.js and i have imported this file in the index.html of the application.
Now i need to call this test() function from app.component.ts file.
function test(){ cosole.log('test'); }
Use below way
(window as any).test()
Assume that i have a javascript file names test.js and i have imported this file in the index.html of the application.
Now i need to call this test() function from app.component.ts file.
function test(){ cosole.log('test'); }
Use below way
(window as any).test()
Great and informative article and this is very important and really worth for me and I am going to implement this program on our website, you have explained it very clearly. thanking you.
ReplyDeleteMAKE MONEY FROM BLOG