How can I render a template from within a template in JSRender? In the previous jquery template, I could use
{{tmpl(Languages) "#languageTemplate"}}
In JSRender, I could find template composition examples in conditional statements and loops. I want to call the template independently.
In JsRender
{{for Languages tmpl="#languageTemplate"/}}
is more or less exactly equivalent to the following in jQuery Templates
{{tmpl(Languages) "#languageTemplate"}}
In each case if Languages is an array, the languageTemplate will render once for each item, but if Languages is not an array, the template will render once.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With