BorisMoore/jsrender — Issue #21: nested templates without a specified data object
Author: sterlingkoch
Created: 2011-11-11 20:39:21+00:00
State: open

In jQuery templates, one could call a nested template without specifying a data object (example: {{tmpl '#myTemplate'}}), which was useful. In jsrender, this does not appear to work and fails with the error 'current is undefined'. I've seen this in two places:

1. A plain template call: {{tmpl='#myTemplate'}}

2. In an {{else}} tag. In your 'helper functions' demo, you show an example of calling a nested template from an {{if}} tag (line 19 and 22), which is cool. Unfortunately, doing this with an {{else}} tag (equivalent of 'elseif') gives the 'current is undefined' error.

Thanks for all your great work, Boris!