The Protevus Platform: Unified Full-Stack Development https://protevus.com
Find a file
Cory Forward a6ae7844f7 MustacheContext and fixed partials resolving
1. Partials are now resolved with the 'path' package
2. MustacheContext is an object that holds all folder contextual information for views and partials, and cleanly isolates all file resolving in one location
2017-04-05 14:43:25 -06:00
lib MustacheContext and fixed partials resolving 2017-04-05 14:43:25 -06:00
test Production Cache 2017-04-04 17:05:16 -06:00
.gitignore Done 2016-04-21 22:22:33 -04:00
LICENSE Initial commit 2016-04-21 21:46:25 -04:00
pubspec.yaml Updated Angel dep 2016-06-21 19:07:19 -04:00
README.md Update README.md 2017-04-05 14:38:59 -04:00

mustache

Mustache (Handlebars) view generator for the Angel web server framework.

Installation

In pubspec.yaml:

dependencies:
    angel_mustache: ^1.0.0

If your project imports package:angel_common, then this is already installed.

Usage

// Run the plug-in
await app.configure(mustache(new Directory('views')));

// Render `hello.mustache`
await res.render('hello', {'name': 'world'});

Options

  • partialsPath: A path within the viewsDirectory to search for partials in. Default is ./partials.
  • fileExtension: The file extension to search for. Default is .mustache.