Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialEvin Hendry
7,522 PointsHow does widget.html link to our widget.js and index.html files? I was wondering how it works without links.
I like to mess around with the workspaces and try to recreate them from memory so I fully understand what's going on, and I couldn't help but notice that widget.html doesn't appear to be linked to any of our other files. Does it not have to be linked if there are matching IDs between HTML files or something? Am I just not finding the link?
2 Answers
Martin Park
12,792 PointsThere is no widget.html file in the workspace project? In the video Dave refers to a widget.html file to show what the hypothetical designer gave us. It is basically a mock up of what the finished file should look like. We do not need it in this example.
If you are meaning where does the Employee information come from it is specified in the the AJAX Open Request and dealt with in the AJAX callback function:
xhr.open('GET', 'data/employees.json');
Evin Hendry
7,522 PointsOh, the answer was right in front of me the whole time! Thank you for your response!