The Protevus Platform: Unified Full-Stack Development
https://protevus.com
lib | ||
test | ||
.gitignore | ||
.travis.yml | ||
LICENSE | ||
pubspec.yaml | ||
README.md |
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
.