I am trying to load a local JSONfile of two ways.
This is my json file:
{ \"imgsesion\": \"fa_closesesion.png\", \"texthome\": \"volver a la home
Step 1: Open tsconfig.json add following lines in compilerOptions:
tsconfig.json
compilerOptions
"resolveJsonModule": true, "esModuleInterop": true
Step 2: import json using following code:
import homeData from './data.json';
Note: This code is tested with Angular 9