../data/employees.json and data/employees.json
In the workspace, I found the path for opening an ajax request is:
But in this video, Dave is using the following path.
In my local environment, only 'data/employees.json' works fine. '../data/employees.json' throws "404 (Not Found)" error
In the workspace, both of them are ok.
BTW, I have the same directory structure as workspace in my local environment.
Does anyone know the reason? Thanks a lot.
Emmanuel Molina9,265 Points
I guess the script is in js/widget.js so you need to go back one level to access your JSON file ( ../data/employees.json ) If you put your script directly at the root of your folder you don't need the ../