Difference between revisions of "Dust.js"

From Wiki @ Karl Jones dot com
Jump to: navigation, search
(Created page with "'''Dust.js''' is a JavaScript templating engine designed to provide a clean separation between presentation and logic without sacrificing ease of use. It is particularly w...")
 
(External links)
Line 26: Line 26:
 
* [http://www.dustjs.com/ Official website]
 
* [http://www.dustjs.com/ Official website]
 
* [http://akdubya.github.io/dustjs/ Dust guide]
 
* [http://akdubya.github.io/dustjs/ Dust guide]
 +
* [http://www.slideshare.net/brikis98/dustjs dust.js @ LinkedIn]
  
 
[[Category:JavaScript]]
 
[[Category:JavaScript]]
 
[[Category:JavaScript libraries]]
 
[[Category:JavaScript libraries]]

Revision as of 14:36, 28 October 2016

Dust.js is a JavaScript templating engine designed to provide a clean separation between presentation and logic without sacrificing ease of use. It is particularly well-suited for asynchronous and streaming applications.

Description

A pure JavaScript library, Dust is runs in both browser-side and server-side environments.

Dust templates are compiled and then loaded where they are needed along with the runtime library. The library doesn't make any assumptions about how templates are loaded; you are free to integrate templating into your environment as you see fit.

Syntax

Dust templates use two types of tags: keys and sections.

Keys reference fields within the current view context. You can think of them as placeholders that allow the context to insert data into the template. Sections accept template blocks that may be enumerated, filtered or transformed in various ways.

Keys

To reference a key from the view context within the template, enclose the key in curly braces.

See also

External links