vol4ok / hogan-express

Mustache template engine for express 3.x. Support partials and layout
MIT License
138 stars 31 forks source link

Question: What is the difference between following two kind of notation? #19

Closed sackIndian closed 10 years ago

sackIndian commented 10 years ago

Hi, could any one clarify the merits and demerits of following two hogan notations?

var myTemplate = Hogan.compile('

Loading..
');

AND

var myTemplate = new Hogan.Template(function(c,p,i){var =this;.b(i=i||"");.b("<div class=\"myclass\">Loading..

");return .fl();;});

(I get this after compiling above template using hulk)

So my question is, which one is best representation and why?

vol4ok commented 10 years ago

Of course the first, please, read Hogan.js page for such questions. https://github.com/twitter/hogan.js