This lab will get you well-versed in using JSON and handlebars to generate pages. They form an important portion of your app. Assignment 6 and 7 include these tasks!
var data = require('../data.json');
$ npm install $ node app.js Express server listening on port 3000
You don't need the
public at the beginning of src. Node.js automatically sets the root("/") as our
public directory. This goes for including css in the next slide as well.
Uncaught ReferenceError: $ is not defined
You have included the files correctly. Just ensure that the jquery script is the first one you include, followed by hci-friends and bootstrap. Include order matters!
When I click on the name, it says that it can't find an anagram for that name.
The most common cause here is that your click listener is not listening to the right element. For example, if you put the click listener on the entire div, when you call text(), it will return a bunch of whitespace around the name, and it won't match our list of anagram keys. Make sure you're selecting only the element that actually has the text inside of it.