0

I'm working on a Angular project, I have a set of files in the assets folder without extension for the file. Ex - File1, File2, File3 and so on.. these files doesn't have extensions to it such as .json or .txt. I need to access the content in these files. How can I access these files and get the data inside it? Kindly help!

TIA

I tried using import file from '../../assets/file1' in the component. But getting this error -

Cannot find module '../../assets/file1' or its corresponding type declarations
```.
arv
  • 5
  • 3
  • can you check [this](https://stackoverflow.com/questions/58149937/how-to-import-custom-file-types-in-typescript) for hints? You will have to `declare` a module, for example `declare module file1 {....}` in a `*.d.ts` file in your project(for convenience you can have a `global.d.ts` file in your project, if not already)... – Nalin Ranjan Mar 31 '22 at 04:34

0 Answers0