I have added some json file to my library, but when I build it there is error my.json file not under rootDir.
Asked
Active
Viewed 152 times
0
-
Welcome to Stack Overflow, kindly go through the [tour](https://stackoverflow.com/tour). – Elysian Storm May 21 '20 at 22:10
1 Answers
0
Assuming you want to access the .json file as part of the application build process (i.e. not via http), you will will need to put it into the assets
folder in your project.
More information about the folder structure of an Angular application here.
You can then follow the instructions here to access the data from your components.

Matt Saunders
- 3,538
- 2
- 22
- 30