LearnFast.Ninja

Mustache partial variable

The way of using partial variable with mustache.

Step 1:
The variable will be in the data (json) you pass to mustache.

Step 2: 
Write if statement in the mustache template to handle each case.

{{#homepage}}
    {{> homepage}}
{{/homepage}}

{{#post}}
    {{> post}}
{{/post}}



Tags

mustache

partial variable