I have a bunch of utility methods stored in a file called utils.ts that I want to reuse across multiple components. I'm not sure if it's even possible, and if it is, where should I place the import statement and what would be the correct syntax. I attempted to link the file in my index.html like this:
<script src="assets/ts/utils.js?v=1.2"></script>
But I encountered an error:
http://localhost:4200/assets/ts/utils.js?v=1.2 net::ERR_ABORTED 404 (Not Found)
Do I need to import the file separately into each component? If so, what would be the correct syntax to do so? Any help would be greatly appreciated.