…Before we can begin building our first Mustache example, let's take…a look at how you define and then render Mustache templates.…So, just like in jQuery template, we're going to use…a script tag to hold the definition of our template.…Now, in this case, the type attribute is going to be slightly different.…It's going to be text/template.…And you should put an id on there, just like I have here.…Now, inside the template definition, we're going to have a container which…is going to hold the content of the results for the template.…
But you'll notice that this is a little bit different than the previous example.…So, back in jQuery template, we had data-attributes that were used to…define where the contents of the data would be put into the template.…Mustache is a little bit different.…Mustache uses two curly braces, followed by the name of…the field, followed by two curly braces going the other way.…So, if the data looks like this, which is the…same data that I showed in the jQuery Template explanation section.…
- What is templating?
- Defining templates in jQuery Template
- Using simple Mustache templates with sections and conditions
- Adding conditionals and loops to Handlebars templates
- Working with Dust templates
Skill Level Intermediate
What is templating?5m 12s
2. jQuery Template
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.