Closed yochannah closed 3 years ago
Try replacing the map function with a simple loop.
// compile template
var template = Hogan.compile("@{{name}}");
var team = ['dhg', 'fat', 'jimio', 'nickgreen', 'sayrer'];
for (var i in team ){
// Render context to template
team[i] = template.render({ name: team[i] });
}
// outputs "Follow: @dhg @fat @jimio @nickgreen @sayrer!"
console.log('Follow: ' + team.join(' ') + '!'); join(' ') + '!');
same as #251.
The demo code here http://twitter.github.io/hogan.js/ in the "render" section
Expected output, as above:
But actually it outputs:
Example: http://jsbin.com/wozafi/edit?html,js,console
I assume either the documentation or the library itself needs any update?