Join Joe Marini for an in-depth discussion in this video Using templates, part of Up and Running with Underscore.js.
Before we take a look at how the templates work,…let's take stock here for a moment of what we have.…Let's switch back over to the browser, and remember, up until this…point, we haven't refreshed yet since we've added all the script logic in.…So, we still have the UI controls as they were when we…first built them and before we added all of our script logic.…So back here in the source code, we've now added all of the script that…handles the wiring up of the events, the updating of the…data set, the applying of the templates, and doing the layout.…
But we haven't actually tried it.…So, let's jump over to the browser really quick, alright.…And let's hit the Refresh button. And you can see that we're now getting the…results in the browser. So the contents of that div are now…being filled out with all of the data.…Now remember, this starts out being all of the students, right?…So I can sort on just the Thoreau students, just the Franklin students.…I can choose to show everybody.…I can choose to show this as cards, or as a table.…
- Understanding what Underscore.js is and does
- Installing Underscore.js
- Sorting, grouping, and filtering data sets
- Extracting information about arrays and objects
- Using templates to format data