xxgreg / mustache

Mustache template Dart library
BSD 2-Clause "Simplified" License
57 stars 59 forks source link

Support for partials #11

Closed sethladd closed 9 years ago

sethladd commented 9 years ago

We could really use this, if it's possible to do.

Thanks for the help!

xxgreg commented 9 years ago

Found a couple of hours to hack on this.

An initial implementation is on this branch. https://github.com/xxgreg/mustache/tree/partials

This allows the end user to provide a closure (a PartialResolver) that will return the correct template given a string name. This allows partials to be used in the browser, but also for a server side client to provide a resolver which looks up templates using dart:io to access the file system.

sethladd commented 9 years ago

wow, thanks!

xxgreg commented 9 years ago

On pub in version 0.2