mustache

Gitterversionbuild status

Mustache (Handlebars) view generator for the Angelweb server framework.

Thanks so much @c4wrd for his help with bringing this project to life!

Installation

In pubspec.yaml:

  1. dependencies:
  2. angel_mustache: ^2.0.0

Usage

  1. const FileSystem fs = const LocalFileSystem();
  2.  
  3. configureServer(Angel app) async {
  4. // Run the plug-in
  5. await app.configure(mustache(fs.directory('views')));
  6.  
  7. // Render `hello.mustache`
  8. await res.render('hello', {'name': 'world'});
  9. }

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.