September 2013
Beginner to intermediate
480 pages
9h 59m
English
Similar to partial templates in other template languages, Jade mixins are smaller template pieces that can accept parameters. Mixins are useful when generating common HTML chunks such as alert boxes, dialogs, and menus.
In this recipe we're going to compare Jade's mixins with the partial templates found in the other template languages by reimplementing the threaded conversation template. This is a recursive template that renders a threaded conversation tree.
We need to download jade.min.js in our recipe folder, available at https://github.com/visionmedia/jade.
Let's get started.
index.html which will contain the conversation placeholder, the main conversation template, and the recursive partial ...Read now
Unlock full access