Because of Mustache scope resolution, even when you call the recursive template, it can still look up the Scope chain to previous contexts, and it will find children there because children is undefined at your lowest level. If you ensure that you always cut the Scope down to the lowest level only when making recursive calls, it works.
↧