Hello @rashnk, I tried here and works.
Put the import js in src/index.html header tag, before the build/polyfills.js and build/main.js (they are in body tag);
I created a file src/assets/teste.js with a var testao, imported in src/index.html and then in src/app/app.component.ts declared declare var testao;.
Im wrking on a dictionary app. so at this moment its json only, total size exceeds12mb, so cant use with typescript due to memory error, so i planned to do it as external js file
Cool, yes, the main.js is generated after ionic’s build, so, the error: ERROR ReferenceError: testvar is not defined occurred because testvar was run before includes test.js.
hi, i have a similar question i would be really thankful if you could answer me. suppose i have a javascript file in assets folder that i wanna use that file in one my pages as <script src="assets/..."> </script>. Now i want to use it not in index.html but in one of my pages.html. how can i do that? is it possible?
as you know the pages don’t have header tag anymore…can i add it to page.ts or what?
How to use external javascript widget inside my ionic page.
Example need to include this https://www.fxstreet.com/info/business/economic-calendar widget inside my ionic page. This is not working except home page.
I have added the below code inside the src/index.html