Mustache deferreds #1031

wants to merge 1 commit into


None yet
2 participants

retro commented May 30, 2014

Implements def helper that can handle deferreds in the template code.

Sample use:

{{#def Todo.findAll}}
    {{#if isResolved}}
            ... iterate over the data

    {{#if isRejected}}
            ... print out the error

    {{#if isPending}}
        still pending

I prefer this syntax to anything other mentioned in the #179 because it's more explicit and it's immediately clear what's happening.

def helper can also handle non-deferred values in which case it will treat it as resolved.

@justinbmeyer any comments?

@daffl daffl modified the milestones: 2.1.2, 2.2.0 Jun 6, 2014

@daffl daffl modified the milestones: 2.3.0, 2.2.0 Jan 10, 2015


This comment has been minimized.

Show comment
Hide comment

daffl May 11, 2015


This has been implemented in 2.2, closing this PR.


daffl commented May 11, 2015

This has been implemented in 2.2, closing this PR.

@daffl daffl closed this May 11, 2015

@daffl daffl deleted the mustache-deferreds branch Oct 22, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment